arbeit
Main Page | Namespace List | Class Hierarchy | Alphabetical List | Compound List | File List | Namespace Members | Compound Members | File Members

VolShaderTexCoord Class Reference

#include <VolShaderStd.h>

Inheritance diagram for VolShaderTexCoord:

VolShaderStd VolShader glift::StateGLI SimBase glift::GliftObject glift::Compilable gutz::Counted List of all members.

Detailed Description

VolShaderTexCoord.

Visualize the texture coordinates for a particular texture unit

Definition at line 41 of file VolShaderStd.h.

Debug prints

from SimBase: These print the object name with the error, mostly for convenience, but they are compiled to inline-no-op if you build in release mode

void derr (const char *when, const char *where=0) const
template<class T> void derr (const char *when, const char *where, const T stuff) const

Text object-name

from SimBase

std::string getObjName ()
std::string getName ()
void setName (std::string name)
void setName (const char *name)

Modification, AKA "changed"

from SimBase: id based, you can capture the current id for comparison later, if the id's don't match the class has been changed

virtual int getChangeID ()
virtual int getChangeID () const
virtual void setChanged ()

Serialization:

from SimBase You MUST override these pure virtual functions, they "should" do something usefull.

It is also nice if you declare a static std::istream &create(std::istream &is) const; function, to create a class from a stream. This is done on a per-concrete class basis.

These aren't pure virutal yet, but will be soon!

virtual std::ostream & saveSelf (std::ostream &os)
 serialize

virtual std::istream & readSelf (std::istream &is)
 unserialize


Public Types

enum  { BLEND_NONE, BLEND_F2B, BLEND_B2F, BLEND_MODE_LAST }
 blend modes More...


Public Member Functions

 VolShaderTexCoord (unsigned int tcNum=0)
 VolShaderTexCoord.

virtual ~VolShaderTexCoord ()
void setPixelShader (glift::PixelShader *ps)
 Set/get Pixel Shader, a user policy.

glift::PixelShaderSP getPixelShader ()
 Get Pixel Shaders.

void setVertexShader (glift::VertexShader *vs)
 Set/get Vertex Shader, a user policy.

glift::VertexShaderSP getVertexShader ()
 Get Vertex Shaders.

void setBlend (int blendMode)
 blend defaults to NONE

int getBlend () const
void bind ()
void release ()
bool isBound ()
virtual void compile ()
virtual bool hasNonCompilable ()
virtual void setErrStream (std::ostream *os)
 Where do you want gl errors to go? they must go somewhere, so don't set it to zero please.

virtual std::ostream * getErrStream () const
 Where are gl errors going?


Protected Member Functions

virtual void bindDef ()
 Bind.

virtual void releaseDef ()
 Release.

virtual void bindState ()
 State Bind and release all state in the state array.

virtual void releaseState ()
 Release State.

virtual void bindShaders ()
 Shaders You probably won't need to override these, They do what ya expect.

virtual void releaseShaders ()
virtual void bindBlend ()
 Blend You probably won't need to override these, They do what ya expect.

virtual void releaseBlend ()
 Release Blend (Protected).

virtual bool isCompiled () const
void err (const char *where, const char *when=0) const
 error

std::ostream & err () const
 a simpler way, just use the stream! only for always print, this one automatically adds the objects name

void derr (const char *where, const char *when=0) const
 debug error

bool glerr (const char *where, const char *when=0) const
 gl error report only in debug mode, only if there is an error, if so return true

std::ostream & estr () const
 this one just gives you the stream

virtual void _incCount ()
 gutz::Counted interface, increment reference count by one.

virtual void _decCount ()
 gutz::Counted interface, decrement reference count by one.

virtual int _getCount () const
 gutz::Counted interface, get the current reference count.


Protected Attributes

glift::PixelShaderSP _curPixShade
glift::VertexShaderSP _curVertShade
glift::VecStateP _state
int _blendMode
std::string _name_
 a text name for the object, SimBase

int _changed
 change id, incremented whenever setChanged is called, SimBase


Friends

class SmartPtr
class SmartPtrRef


Member Enumeration Documentation

anonymous enum [inherited]
 

blend modes

Enumeration values:
BLEND_NONE 
BLEND_F2B  blending off
BLEND_B2F  Front to back.
BLEND_MODE_LAST  add new modes after this enum value

Definition at line 49 of file VolShader.h.


Constructor & Destructor Documentation

VolShaderTexCoord::VolShaderTexCoord unsigned int  tcNum = 0  ) 
 

VolShaderTexCoord.

<< tcNum << "]; \n"

Definition at line 72 of file VolShaderStd.cpp.

References VolShader::setPixelShader(), and string.

virtual VolShaderTexCoord::~VolShaderTexCoord  )  [inline, virtual]
 

Definition at line 44 of file VolShaderStd.h.


Member Function Documentation

virtual void gutz::Counted::_decCount  )  [inline, protected, virtual, inherited]
 

gutz::Counted interface, decrement reference count by one.

Not generaly used by subclasses, mostly for collaboration with gutz::SmartPtr. Sometimes you need to call this though, see the documentation for gutz::SmartPtr

Definition at line 54 of file smartptr.h.

Referenced by TFImage::clear(), NrroImage::fBlendOverRGBA(), and Nrro::updateMinMax().

virtual int gutz::Counted::_getCount  )  const [inline, protected, virtual, inherited]
 

gutz::Counted interface, get the current reference count.

Not generaly used by subclasses, mostly for collaboration with gutz::SmartPtr.

Definition at line 58 of file smartptr.h.

virtual void gutz::Counted::_incCount  )  [inline, protected, virtual, inherited]
 

gutz::Counted interface, increment reference count by one.

Not generaly used by subclasses, mostly for collaboration with gutz::SmartPtr. Sometimes you need to call this though, see the documentation for gutz::SmartPtr

Definition at line 48 of file smartptr.h.

Referenced by TFImage::clear(), NrroImage::fBlendOverRGBA(), and Nrro::updateMinMax().

void StateGLI::bind  )  [inherited]
 

Definition at line 34 of file stateGLI.cpp.

References glift::StateGLI::bindDef(), glift::DispList::isCompiled(), and glift::DispList::issue().

Referenced by glift::SubTex::bindDef(), glift::CoreTex::bindDef(), glift::Shader::bindDef(), glift::ProgShader::bindDef(), glift::ShadedPrim::drawDef(), and VolRenAlgBase::drawTris().

void VolShader::bindBlend  )  [protected, virtual, inherited]
 

Blend You probably won't need to override these, They do what ya expect.

Definition at line 174 of file VolShader.cpp.

References VolShader::_blendMode, VolShader::BLEND_B2F, VolShader::BLEND_F2B, SimBase::derr(), GL_BLEND, GL_ONE, GL_ONE_MINUS_DST_ALPHA, GL_ONE_MINUS_SRC_ALPHA, glBlendFunc(), and glEnable().

Referenced by VolShaderStd::bindDef(), and VolShader::setBlend().

void VolShaderStd::bindDef  )  [protected, virtual, inherited]
 

Bind.

Reimplemented from VolShader.

Definition at line 45 of file VolShaderStd.cpp.

References VolShader::bindBlend(), VolShader::bindShaders(), GL_FALSE, GL_LIGHTING, glColor4f(), glDepthMask(), and glDisable().

void VolShader::bindShaders  )  [protected, virtual, inherited]
 

Shaders You probably won't need to override these, They do what ya expect.

Definition at line 64 of file VolShader.cpp.

References VolShader::_curPixShade, and VolShader::_curVertShade.

Referenced by VolShaderStd::bindDef().

void VolShader::bindState  )  [protected, virtual, inherited]
 

State Bind and release all state in the state array.

Bind State

Definition at line 134 of file VolShader.cpp.

References VolShader::_state.

void StateGLI::compile  )  [virtual, inherited]
 

Compile new disply lists

Force deletion/construction of new objects in case a display list already exists for this object.

Implements glift::Compilable.

Definition at line 81 of file stateGLI.cpp.

References glift::DispList::compile(), and glift::g_compiling.

Referenced by glift::VertexProgARB::reset(), glift::PixelShaderATI8K::reset(), and glift::FragProgARB::reset().

template<class T>
void SimBase::derr const char *  when,
const char *  where,
const T  stuff
const [inline, inherited]
 

only prints in debug mode, -D_DEBUG

Definition at line 130 of file simBase.h.

References SimBase::_name_.

void SimBase::derr const char *  when,
const char *  where = 0
const [inline, inherited]
 

only prints in debug mode, -D_DEBUG

Definition at line 113 of file simBase.h.

References SimBase::_name_.

Referenced by AlgObj::addInput(), Key::addKey(), SourceObj::addOutput(), VolShader::bindBlend(), VolField::checkDims(), VolFieldVec::checkField(), VolFieldVec::checkFields(), AlgObj::checkInputs(), AlgObj::delInput(), Key::delKey(), Crank::delMP(), SourceObj::delOutput(), Crank::delTape(), TFGeneric::eval(), SourceObj::execDef(), ColorMapper::execDef(), AlgObj::execDef(), AlgObj::execute(), SourceObj::force(), AlgObj::force(), VolField::genTexture(), TFGeneric::get2DMap(), DataObj::getConsumer(), VolFieldVec::getField(), AlgObj::getInputN(), Key::getKey(), Crank::getMP(), Crank::getMPIdx(), SourceObj::getOutputN(), Crank::getTape(), AlgObj::inputsModified(), Crank::insertTape(), Crank::kindErr(), VolyCube::loadNrro(), VolyCube::readState(), Volytope::readState(), SourceObj::request(), DataObj::request_(), VolytopeVec::setField(), SourceObj::setForwardModified(), DataObj::setForwardModified(), TFGeneric::setImage(), AlgObj::setInputN(), Key::setKey(), Crank::setMP(), VolField::setNrro(), SourceObj::setOutputN(), Crank::setTape(), Volume::update(), SourceObj::updateOutputs(), Volume::updateRectLin(), Volume::updateVolytopesRL(), VolyCube::VolyCube(), and Volytope::writeState().

void glift::GliftObject::derr const char *  where,
const char *  when = 0
const [inline, protected, inherited]
 

debug error

Definition at line 122 of file gliftObject.h.

References glift::GliftObject::m_err.

std::ostream & glift::GliftObject::err  )  const [inline, protected, inherited]
 

a simpler way, just use the stream! only for always print, this one automatically adds the objects name

Definition at line 111 of file gliftObject.h.

References glift::GliftObject::m_err.

Referenced by glift::CoordTrans::apply(), glift::SubTex::bindDef(), glift::PrimGL::bindIndices(), glift::SubdivPlanarQuadS::bindQuads(), glift::PrimGL::bindTexCoords(), glift::CoreTex::checkTexType(), glift::EmptyTex::copyToTex(), glift::CoreTex::CoreTex(), glift::FuncTex::FuncTex(), glift::Shader::genTexCoords(), glift::CoreTex::getDataf(), glift::CoreTex::getDataub(), glift::VertexProgARB::init(), glift::FragProgARB::init(), glift::PriorityTex::PriorityTex(), glift::VertexProgARB::reload(), glift::FragProgARB::reload(), glift::RenderableGLI::render(), glift::RenderPass::renderDef(), glift::EmptyTex::resetTexState(), glift::PixelShaderATI8K::setLocalConstf(), glift::TexCube::setTexData(), glift::EmptyTex::setTexData(), glift::ShadedPrim::ShadedPrim(), glift::TexConst::TexConst(), glift::TexCube::TexCube(), and glift::EmptyTex::tryToBindPbuff().

void glift::GliftObject::err const char *  where,
const char *  when = 0
const [inline, protected, inherited]
 

error

Definition at line 101 of file gliftObject.h.

References glift::GliftObject::m_err.

Referenced by glift::SubPBuff::enable().

std::ostream& glift::GliftObject::estr  )  const [inline, protected, inherited]
 

this one just gives you the stream

Definition at line 84 of file gliftObject.h.

References glift::GliftObject::m_err.

Referenced by glift::CoreTex::bindDef(), glift::Shader::bindDef(), glift::MultiTex::bindDef(), glift::EmptyTex::bindDef(), glift::DispList::compile(), glift::CoreTex::CoreTex(), glift::VertexProgARB::init(), glift::FragProgARB::init(), glift::MultiTex::releaseDef(), and glift::EmptyTex::releaseDef().

int VolShader::getBlend  )  const [inline, inherited]
 

Definition at line 57 of file VolShader.h.

References VolShader::_blendMode.

virtual int SimBase::getChangeID  )  const [inline, virtual, inherited]
 

Definition at line 73 of file simBase.h.

References SimBase::_changed.

virtual int SimBase::getChangeID  )  [inline, virtual, inherited]
 

Reimplemented in TFGeneric, TFBaseSP, and TFEltSP.

Definition at line 72 of file simBase.h.

References SimBase::_changed.

Referenced by TFEltSP::getChangeID(), TFBaseSP::getChangeID(), and TFGeneric::getChangeID().

virtual std::ostream* glift::GliftObject::getErrStream  )  const [inline, virtual, inherited]
 

Where are gl errors going?

Definition at line 49 of file gliftObject.h.

References glift::GliftObject::m_err.

Referenced by glift::getProgShaderFromFile(), and glift::getProgShaderFromText().

std::string SimBase::getName  )  [inline, inherited]
 

Definition at line 45 of file simBase.h.

References SimBase::_name_.

Referenced by MetaProg::operator<<().

std::string SimBase::getObjName  )  [inline, inherited]
 

Definition at line 44 of file simBase.h.

References string.

PixelShaderSP VolShader::getPixelShader  )  [inherited]
 

Get Pixel Shaders.

Definition at line 100 of file VolShader.cpp.

References VolShader::_curPixShade.

VertexShaderSP VolShader::getVertexShader  )  [inherited]
 

Get Vertex Shaders.

Definition at line 124 of file VolShader.cpp.

References VolShader::_curVertShade.

bool GliftObject::glerr const char *  where,
const char *  when = 0
const [protected, inherited]
 

gl error report only in debug mode, only if there is an error, if so return true

Definition at line 31 of file gliftObject.cpp.

References glGetError(), and GLuint.

Referenced by RenderState2D::bindDef(), glift::NormalAttrib< VAT >::disableDef(), glift::IndexAttrib< VAT >::disableDef(), glift::TexCoordAttrib< VAT >::disableDef(), glift::VertAttrib< VAT >::disableDef(), glift::GenDrawAttrib< VAT >::disableDef(), glift::DrawAlgImm::draw(), glift::DrawAlgArr::draw(), glift::ShadedPrim::drawDef(), glift::NormalAttrib< VAT >::enableDef(), glift::IndexAttrib< VAT >::enableDef(), glift::TexCoordAttrib< VAT >::enableDef(), glift::VertAttrib< VAT >::enableDef(), glift::GenDrawAttrib< VAT >::enableDef(), and RenderState2D::releaseDef().

virtual bool glift::StateGLI::hasNonCompilable  )  [inline, virtual, inherited]
 

Definition at line 72 of file stateGLI.h.

bool glift::StateGLI::isBound  )  [inline, inherited]
 

Definition at line 70 of file stateGLI.h.

Referenced by glift::GenPrimGL< VERTA, TEXCA, IDXA, RANGEA >::drawDef(), VolShader::setBlend(), VolRenAlgBase::setGeom(), VolShader::setPixelShader(), VolRenAlgBase::setShader(), VolShader::setVertexShader(), and VolRenAlgBase::setVolytope().

virtual bool glift::StateGLI::isCompiled  )  const [inline, protected, virtual, inherited]
 

Implements glift::Compilable.

Definition at line 81 of file stateGLI.h.

Referenced by glift::VertexProgARB::reset(), glift::PixelShaderATI8K::reset(), and glift::FragProgARB::reset().

virtual std::istream& SimBase::readSelf std::istream &  is  )  [inline, virtual, inherited]
 

unserialize

Reimplemented in SimCore, and VolRenBase.

Definition at line 94 of file simBase.h.

void StateGLI::release  )  [inherited]
 

Definition at line 57 of file stateGLI.cpp.

References glift::DispList::isCompiled(), glift::DispList::issue(), and glift::StateGLI::releaseDef().

Referenced by glift::ShadedPrim::drawDef(), VolRenAlgBase::drawTris(), glift::CoreTex::getDataub(), glift::SubTex::releaseDef(), glift::CoreTex::releaseDef(), glift::Shader::releaseDef(), and glift::ProgShader::releaseDef().

void VolShader::releaseBlend  )  [protected, virtual, inherited]
 

Release Blend (Protected).

Definition at line 195 of file VolShader.cpp.

References GL_BLEND, and glDisable().

Referenced by VolShaderStd::releaseDef(), and VolShader::setBlend().

void VolShaderStd::releaseDef  )  [protected, virtual, inherited]
 

Release.

Reimplemented from VolShader.

Definition at line 57 of file VolShaderStd.cpp.

References GL_LIGHTING, GL_TRUE, glDepthMask(), glEnable(), VolShader::releaseBlend(), and VolShader::releaseShaders().

void VolShader::releaseShaders  )  [protected, virtual, inherited]
 

Definition at line 70 of file VolShader.cpp.

References VolShader::_curPixShade, and VolShader::_curVertShade.

Referenced by VolShaderStd::releaseDef().

void VolShader::releaseState  )  [protected, virtual, inherited]
 

Release State.

Definition at line 144 of file VolShader.cpp.

References VolShader::_state.

virtual std::ostream& SimBase::saveSelf std::ostream &  os  )  [inline, virtual, inherited]
 

serialize

Reimplemented in SimCore, and VolRenBase.

Definition at line 92 of file simBase.h.

void VolShader::setBlend int  blendMode  )  [inherited]
 

blend defaults to NONE

Definition at line 158 of file VolShader.cpp.

References VolShader::_blendMode, VolShader::bindBlend(), glift::StateGLI::isBound(), and VolShader::releaseBlend().

virtual void SimBase::setChanged  )  [inline, virtual, inherited]
 

Definition at line 74 of file simBase.h.

References SimBase::_changed.

Referenced by TFEltSP::getChangeID(), TFBaseSP::getChangeID(), TFBaseSP::operator=(), and TFGeneric::update().

virtual void glift::GliftObject::setErrStream std::ostream *  os  )  [inline, virtual, inherited]
 

Where do you want gl errors to go? they must go somewhere, so don't set it to zero please.

Definition at line 44 of file gliftObject.h.

References glift::GliftObject::m_err.

Referenced by glift::getProgShaderFromFile(), and glift::getProgShaderFromText().

void SimBase::setName const char *  name  )  [inline, inherited]
 

Definition at line 47 of file simBase.h.

References SimBase::_name_, and name.

void SimBase::setName std::string  name  )  [inline, inherited]
 

Reimplemented in Key.

Definition at line 46 of file simBase.h.

References SimBase::_name_, and name.

Referenced by EventData::EventData(), and GenDataObj_base< Nrro, gutz::SmartPtr< Nrro > >::GenDataObj_base().

void VolShader::setPixelShader glift::PixelShader ps  )  [inherited]
 

Set/get Pixel Shader, a user policy.

Definition at line 83 of file VolShader.cpp.

References VolShader::_curPixShade, and glift::StateGLI::isBound().

Referenced by VolShaderStd::VolShaderStd(), and VolShaderTexCoord().

void VolShader::setVertexShader glift::VertexShader vs  )  [inherited]
 

Set/get Vertex Shader, a user policy.

Definition at line 108 of file VolShader.cpp.

References VolShader::_curVertShade, and glift::StateGLI::isBound().


Friends And Related Function Documentation

friend class SmartPtr [friend, inherited]
 

Definition at line 40 of file smartptr.h.

Referenced by Nrro::NrroIter< T >::NrroIter().

friend class SmartPtrRef [friend, inherited]
 

Definition at line 41 of file smartptr.h.


Member Data Documentation

int VolShader::_blendMode [protected, inherited]
 

Definition at line 95 of file VolShader.h.

Referenced by VolShader::bindBlend(), VolShader::getBlend(), and VolShader::setBlend().

int SimBase::_changed [protected, inherited]
 

change id, incremented whenever setChanged is called, SimBase

Definition at line 103 of file simBase.h.

Referenced by SimBase::getChangeID(), SimBase::setChanged(), and SimBase::SimBase().

glift::PixelShaderSP VolShader::_curPixShade [protected, inherited]
 

Definition at line 90 of file VolShader.h.

Referenced by VolShader::bindShaders(), VolShader::getPixelShader(), VolShader::releaseShaders(), and VolShader::setPixelShader().

glift::VertexShaderSP VolShader::_curVertShade [protected, inherited]
 

Definition at line 91 of file VolShader.h.

Referenced by VolShader::bindShaders(), VolShader::getVertexShader(), VolShader::releaseShaders(), and VolShader::setVertexShader().

std::string SimBase::_name_ [protected, inherited]
 

a text name for the object, SimBase

Definition at line 101 of file simBase.h.

Referenced by SimBase::derr(), SimBase::getName(), SimBase::setName(), and SimBase::SimBase().

glift::VecStateP VolShader::_state [protected, inherited]
 

Definition at line 93 of file VolShader.h.

Referenced by VolShader::bindState(), and VolShader::releaseState().


The documentation for this class was generated from the following files:
Send questions, comments, and bug reports to:
jmk