#include <VolShader.h>
Inheritance diagram for VolShader:
Definition at line 30 of file VolShader.h.
Text object-name | |
from SimBase | |
std::string | getObjName () |
std::string | getName () |
void | setName (std::string name) |
void | setName (const char *name) |
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 |
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 | |
VolShader () | |
Construct / Destruct. | |
virtual | ~VolShader () |
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 () |
Defs Override these to change the behavior of this class, default draws lines. | |
virtual void | releaseDef () |
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 |
|
blend modes
Definition at line 49 of file VolShader.h. |
|
Construct / Destruct.
Definition at line 28 of file VolShader.cpp. |
|
Definition at line 39 of file VolShader.cpp. |
|
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(). |
|
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. |
|
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(). |
|
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(). |
|
Blend You probably won't need to override these, They do what ya expect.
Definition at line 174 of file VolShader.cpp. References _blendMode, BLEND_B2F, 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 setBlend(). |
|
Defs Override these to change the behavior of this class, default draws lines.
Implements glift::StateGLI. Reimplemented in VolShaderStd. Definition at line 46 of file VolShader.cpp. References GL_FRONT_AND_BACK, GL_LIGHTING, GL_LINE, GL_TRUE, glColor4f(), glDepthMask(), glDisable(), and glPolygonMode(). |
|
Shaders You probably won't need to override these, They do what ya expect.
Definition at line 64 of file VolShader.cpp. References _curPixShade, and _curVertShade. Referenced by VolShaderStd::bindDef(). |
|
State Bind and release all state in the state array. Bind State Definition at line 134 of file VolShader.cpp. References _state. |
|
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(). |
|
only prints in debug mode, -D_DEBUG Definition at line 130 of file simBase.h. References SimBase::_name_. |
|
|
debug error
Definition at line 122 of file gliftObject.h. References glift::GliftObject::m_err. |
|
|
error
Definition at line 101 of file gliftObject.h. References glift::GliftObject::m_err. Referenced by glift::SubPBuff::enable(). |
|
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(). |
|
Definition at line 57 of file VolShader.h. References _blendMode. |
|
Definition at line 73 of file simBase.h. References SimBase::_changed. |
|
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(). |
|
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(). |
|
Definition at line 45 of file simBase.h. References SimBase::_name_. Referenced by MetaProg::operator<<(). |
|
Definition at line 44 of file simBase.h. References string. |
|
Get Pixel Shaders.
Definition at line 100 of file VolShader.cpp. References _curPixShade. |
|
Get Vertex Shaders.
Definition at line 124 of file VolShader.cpp. References _curVertShade. |
|
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(). |
|
Definition at line 72 of file stateGLI.h. |
|
Definition at line 70 of file stateGLI.h. Referenced by glift::GenPrimGL< VERTA, TEXCA, IDXA, RANGEA >::drawDef(), setBlend(), VolRenAlgBase::setGeom(), setPixelShader(), VolRenAlgBase::setShader(), setVertexShader(), and VolRenAlgBase::setVolytope(). |
|
Implements glift::Compilable. Definition at line 81 of file stateGLI.h. Referenced by glift::VertexProgARB::reset(), glift::PixelShaderATI8K::reset(), and glift::FragProgARB::reset(). |
|
unserialize
Reimplemented in SimCore, and VolRenBase. |
|
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(). |
|
Release Blend (Protected).
Definition at line 195 of file VolShader.cpp. References GL_BLEND, and glDisable(). Referenced by VolShaderStd::releaseDef(), and setBlend(). |
|
Implements glift::StateGLI. Reimplemented in VolShaderStd. Definition at line 54 of file VolShader.cpp. References GL_FILL, GL_FRONT_AND_BACK, GL_LIGHTING, glColor4f(), glEnable(), and glPolygonMode(). |
|
Definition at line 70 of file VolShader.cpp. References _curPixShade, and _curVertShade. Referenced by VolShaderStd::releaseDef(). |
|
Release State.
Definition at line 144 of file VolShader.cpp. References _state. |
|
serialize
Reimplemented in SimCore, and VolRenBase. |
|
blend defaults to NONE
Definition at line 158 of file VolShader.cpp. References _blendMode, bindBlend(), glift::StateGLI::isBound(), and releaseBlend(). |
|
Definition at line 74 of file simBase.h. References SimBase::_changed. Referenced by TFEltSP::getChangeID(), TFBaseSP::getChangeID(), TFBaseSP::operator=(), and TFGeneric::update(). |
|
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(). |
|
Definition at line 47 of file simBase.h. References SimBase::_name_, and name. |
|
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(). |
|
Set/get Pixel Shader, a user policy.
Definition at line 83 of file VolShader.cpp. References _curPixShade, and glift::StateGLI::isBound(). Referenced by VolShaderStd::VolShaderStd(), and VolShaderTexCoord::VolShaderTexCoord(). |
|
Set/get Vertex Shader, a user policy.
Definition at line 108 of file VolShader.cpp. References _curVertShade, and glift::StateGLI::isBound(). |
|
Definition at line 40 of file smartptr.h. Referenced by Nrro::NrroIter< T >::NrroIter(). |
|
Definition at line 41 of file smartptr.h. |
|
Definition at line 95 of file VolShader.h. Referenced by bindBlend(), getBlend(), and setBlend(). |
|
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(). |
|
Definition at line 90 of file VolShader.h. Referenced by bindShaders(), getPixelShader(), releaseShaders(), and setPixelShader(). |
|
Definition at line 91 of file VolShader.h. Referenced by bindShaders(), getVertexShader(), releaseShaders(), and setVertexShader(). |
|
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(). |
|
Definition at line 93 of file VolShader.h. Referenced by bindState(), and releaseState(). |