#include <OSGFragmentProgramChunkBase.h>
Inheritance diagram for osg::FragmentProgramChunkBase:

Public Types | |
| typedef FragmentProgramChunkPtr | Ptr |
| enum | { ProgramFieldId = Inherited::NextFieldId, ParamValuesFieldId = ProgramFieldId + 1, ParamNamesFieldId = ParamValuesFieldId + 1, GLIdFieldId = ParamNamesFieldId + 1, NextFieldId = GLIdFieldId + 1 } |
Public Member Functions | |
ProgamChunk Commands | |
| *bool | read (const char *file) |
| bool | read (std::istream &stream) |
| bool | addParameter (const char *name, Int16 index) |
| bool | addParameter (const char *name, Int16 index, const Vec4f &value) |
| const Vec4f & | getParameter (Int16 index) |
| const Vec4f & | getParameter (const char *name) |
| const Vec4f & | getParameter (const std::string &name) |
| bool | setParameter (Int16 index, const Vec4f &value) |
| bool | setParameter (const char *name, const Vec4f &value) |
| bool | setParameter (const std::string &name, const Vec4f &value) |
| Int16 | findParameter (const char *name) |
| Int16 | findParameter (const std::string &name) |
State Commands | |
| *virtual void | activate (DrawActionBase *action, UInt32 index=0) |
| virtual void | changeFrom (DrawActionBase *action, StateChunk *old, UInt32 index=0) |
| virtual void | deactivate (DrawActionBase *action, UInt32 index=0) |
| virtual bool | isTransparent (void) const |
Comparison | |
| *virtual Real32 | switchCost (StateChunk *chunk) |
| virtual bool | operator< (const StateChunk &other) const |
| virtual bool | operator== (const StateChunk &other) const |
| virtual bool | operator!= (const StateChunk &other) const |
Field Get | |
| *SFString * | getSFProgram (void) |
| Get the ProgramChunk::_sfProgram field. | |
| MFVec4f * | getMFParamValues (void) |
| Get the ProgramChunk::_mfParamValues field. | |
| MFString * | getMFParamNames (void) |
| Get the ProgramChunk::_mfParamNames field. | |
| std::string & | getProgram (void) |
| Get the value of the ProgramChunk::_sfProgram field. | |
| const std::string & | getProgram (void) const |
| Get the value of the ProgramChunk::_sfProgram field. | |
| Vec4f & | getParamValues (const UInt32 index) |
| Get the value of the index element the ProgramChunk::_mfParamValues field. | |
| MFVec4f & | getParamValues (void) |
| Get the ProgramChunk::_mfParamValues field. | |
| const MFVec4f & | getParamValues (void) const |
| Get the ProgramChunk::_mfParamValues field. | |
| std::string & | getParamNames (const UInt32 index) |
| Get the value of the index element the ProgramChunk::_mfParamNames field. | |
| MFString & | getParamNames (void) |
| Get the ProgramChunk::_mfParamNames field. | |
| const MFString & | getParamNames (void) const |
| Get the ProgramChunk::_mfParamNames field. | |
Field Set | |
| *void | setProgram (const std::string &value) |
| Set the value of the ProgramChunk::_sfProgram field. | |
FieldContainer Get | |
| *virtual FieldContainerType & | getType (void) |
| virtual const FieldContainerType & | getType (void) const |
| virtual UInt32 | getContainerSize (void) const |
Binary Access | |
| *virtual UInt32 | getBinSize (const BitVector &whichField) |
| virtual void | copyToBin (BinaryDataHandler &pMem, const BitVector &whichField) |
| virtual void | copyFromBin (BinaryDataHandler &pMem, const BitVector &whichField) |
Copy | |
| *virtual FieldContainerPtr | shallowCopy (void) const |
Chunk Class Access | |
| *virtual const StateChunkClass * | getClass (void) const |
Sync | |
| *virtual void | changed (BitVector whichField, UInt32 origin) |
Output | |
| *virtual void | dump (UInt32 uiIndent=0, const BitVector bvFlags=0) const |
ProgamChunk Commands | |
| *bool | read (const char *file) |
| bool | read (std::istream &stream) |
| bool | addParameter (const char *name, Int16 index) |
| bool | addParameter (const char *name, Int16 index, const Vec4f &value) |
| const Vec4f & | getParameter (Int16 index) |
| const Vec4f & | getParameter (const char *name) |
| const Vec4f & | getParameter (const std::string &name) |
| bool | setParameter (Int16 index, const Vec4f &value) |
| bool | setParameter (const char *name, const Vec4f &value) |
| bool | setParameter (const std::string &name, const Vec4f &value) |
| Int16 | findParameter (const char *name) |
| Int16 | findParameter (const std::string &name) |
State Commands | |
| *virtual void | activate (DrawActionBase *action, UInt32 index=0) |
| virtual void | changeFrom (DrawActionBase *action, StateChunk *old, UInt32 index=0) |
| virtual void | deactivate (DrawActionBase *action, UInt32 index=0) |
| virtual bool | isTransparent (void) const |
Comparison | |
| *virtual Real32 | switchCost (StateChunk *chunk) |
| virtual bool | operator< (const StateChunk &other) const |
| virtual bool | operator== (const StateChunk &other) const |
| virtual bool | operator!= (const StateChunk &other) const |
Field Get | |
| *SFString * | getSFProgram (void) |
| Get the ProgramChunk::_sfProgram field. | |
| MFVec4f * | getMFParamValues (void) |
| Get the ProgramChunk::_mfParamValues field. | |
| MFString * | getMFParamNames (void) |
| Get the ProgramChunk::_mfParamNames field. | |
| std::string & | getProgram (void) |
| Get the value of the ProgramChunk::_sfProgram field. | |
| const std::string & | getProgram (void) const |
| Get the value of the ProgramChunk::_sfProgram field. | |
| Vec4f & | getParamValues (const UInt32 index) |
| Get the value of the index element the ProgramChunk::_mfParamValues field. | |
| MFVec4f & | getParamValues (void) |
| Get the ProgramChunk::_mfParamValues field. | |
| const MFVec4f & | getParamValues (void) const |
| Get the ProgramChunk::_mfParamValues field. | |
| std::string & | getParamNames (const UInt32 index) |
| Get the value of the index element the ProgramChunk::_mfParamNames field. | |
| MFString & | getParamNames (void) |
| Get the ProgramChunk::_mfParamNames field. | |
| const MFString & | getParamNames (void) const |
| Get the ProgramChunk::_mfParamNames field. | |
Field Set | |
| *void | setProgram (const std::string &value) |
| Set the value of the ProgramChunk::_sfProgram field. | |
Chunk Class Access | |
| *virtual const StateChunkClass * | getClass (void) const |
Sync | |
| *virtual void | changed (BitVector whichField, UInt32 origin) |
Output | |
| *virtual void | dump (UInt32 uiIndent=0, const BitVector bvFlags=0) const |
ProgamChunk Commands | |
| *bool | read (const char *file) |
| bool | read (std::istream &stream) |
| bool | addParameter (const char *name, Int16 index) |
| bool | addParameter (const char *name, Int16 index, const Vec4f &value) |
| const Vec4f & | getParameter (Int16 index) |
| const Vec4f & | getParameter (const char *name) |
| const Vec4f & | getParameter (const std::string &name) |
| bool | setParameter (Int16 index, const Vec4f &value) |
| bool | setParameter (const char *name, const Vec4f &value) |
| bool | setParameter (const std::string &name, const Vec4f &value) |
| Int16 | findParameter (const char *name) |
| Int16 | findParameter (const std::string &name) |
State Commands | |
| *virtual void | activate (DrawActionBase *action, UInt32 index=0) |
| virtual void | changeFrom (DrawActionBase *action, StateChunk *old, UInt32 index=0) |
| virtual void | deactivate (DrawActionBase *action, UInt32 index=0) |
| virtual bool | isTransparent (void) const |
Comparison | |
| *virtual Real32 | switchCost (StateChunk *chunk) |
| virtual bool | operator< (const StateChunk &other) const |
| virtual bool | operator== (const StateChunk &other) const |
| virtual bool | operator!= (const StateChunk &other) const |
Field Get | |
| *SFString * | getSFProgram (void) |
| Get the ProgramChunk::_sfProgram field. | |
| MFVec4f * | getMFParamValues (void) |
| Get the ProgramChunk::_mfParamValues field. | |
| MFString * | getMFParamNames (void) |
| Get the ProgramChunk::_mfParamNames field. | |
| std::string & | getProgram (void) |
| Get the value of the ProgramChunk::_sfProgram field. | |
| const std::string & | getProgram (void) const |
| Get the value of the ProgramChunk::_sfProgram field. | |
| Vec4f & | getParamValues (const UInt32 index) |
| Get the value of the index element the ProgramChunk::_mfParamValues field. | |
| MFVec4f & | getParamValues (void) |
| Get the ProgramChunk::_mfParamValues field. | |
| const MFVec4f & | getParamValues (void) const |
| Get the ProgramChunk::_mfParamValues field. | |
| std::string & | getParamNames (const UInt32 index) |
| Get the value of the index element the ProgramChunk::_mfParamNames field. | |
| MFString & | getParamNames (void) |
| Get the ProgramChunk::_mfParamNames field. | |
| const MFString & | getParamNames (void) const |
| Get the ProgramChunk::_mfParamNames field. | |
Field Set | |
| *void | setProgram (const std::string &value) |
| Set the value of the ProgramChunk::_sfProgram field. | |
Static Public Member Functions | |
Class Get | |
| *static FieldContainerType & | getClassType (void) |
| access the type of the class | |
| static UInt32 | getClassTypeId (void) |
| access the numerical type of the class | |
Construction | |
| *static FragmentProgramChunkPtr | create (void) |
| create a new instance of the class | |
| static FragmentProgramChunkPtr | createEmpty (void) |
| create an empty new instance of the class, do not copy the prototype | |
Static Chunk Class Access | |
| *static UInt32 | getStaticClassId (void) |
| static const StateChunkClass * | getStaticClass (void) |
Static Chunk Class Access | |
| *static UInt32 | getStaticClassId (void) |
| static const StateChunkClass * | getStaticClass (void) |
Static Public Attributes | |
| static const osg::BitVector | MTInfluenceMask |
| static const osg::BitVector | ProgramFieldMask |
| static const osg::BitVector | ParamValuesFieldMask |
| static const osg::BitVector | ParamNamesFieldMask |
| static const osg::BitVector | GLIdFieldMask |
| static const BitVector | InternalFieldMask = (1 << Attachment::InternalFieldId) |
| static const BitVector | ParentsFieldMask = (1 << Attachment::ParentsFieldId) |
| static const BitVector | NextFieldMask |
Protected Member Functions | |
Init | |
| *void | onCreate (const ProgramChunk *source=NULL) |
GL | |
| *void | handleGL (Window *win, UInt32 id, GLenum target, UInt32 extension) |
Sync | |
| *void | executeSyncImpl (ProgramChunkBase *pOther, const BitVector &whichField) |
Program-Specific Methods | |
| void | printCompileError (Window *win, UInt32 idstatus) |
Field Get | |
| *SFUInt32 * | getSFGLId (void) |
| Get the ProgramChunk::_sfGLId field. | |
| UInt32 & | getGLId (void) |
| Get the value of the ProgramChunk::_sfGLId field. | |
| const UInt32 & | getGLId (void) const |
| Get the value of the ProgramChunk::_sfGLId field. | |
Field Set | |
| *void | setGLId (const UInt32 &value) |
| Set the value of the ProgramChunk::_sfGLId field. | |
Constructors | |
| * | FragmentProgramChunkBase (void) |
| FragmentProgramChunkBase (const FragmentProgramChunkBase &source) | |
Destructors | |
| *virtual | ~FragmentProgramChunkBase (void) |
Sync | |
| *void | executeSyncImpl (FragmentProgramChunkBase *pOther, const BitVector &whichField) |
| virtual void | executeSync (FieldContainer &other, const BitVector &whichField) |
Init | |
| *void | onCreate (const ProgramChunk *source=NULL) |
Program-Specific Methods | |
| *virtual UInt32 | getExtension (void) const |
| virtual GLenum | getTarget (void) const |
| virtual const char * | getTargetName (void) const |
| void | printCompileError (Window *win, UInt32 idstatus) |
GL | |
| *void | handleGL (Window *win, UInt32 id, GLenum target, UInt32 extension) |
Field Get | |
| *SFUInt32 * | getSFGLId (void) |
| Get the ProgramChunk::_sfGLId field. | |
| UInt32 & | getGLId (void) |
| Get the value of the ProgramChunk::_sfGLId field. | |
| const UInt32 & | getGLId (void) const |
| Get the value of the ProgramChunk::_sfGLId field. | |
Field Set | |
| *void | setGLId (const UInt32 &value) |
| Set the value of the ProgramChunk::_sfGLId field. | |
Sync | |
| *void | executeSyncImpl (ProgramChunkBase *pOther, const BitVector &whichField) |
Init | |
| *void | onCreate (const ProgramChunk *source=NULL) |
Program-Specific Methods | |
| *virtual UInt32 | getExtension (void) const |
| virtual GLenum | getTarget (void) const |
| virtual const char * | getTargetName (void) const |
| void | printCompileError (Window *win, UInt32 idstatus) |
GL | |
| *void | handleGL (Window *win, UInt32 id, GLenum target, UInt32 extension) |
Field Get | |
| *SFUInt32 * | getSFGLId (void) |
| Get the ProgramChunk::_sfGLId field. | |
| UInt32 & | getGLId (void) |
| Get the value of the ProgramChunk::_sfGLId field. | |
| const UInt32 & | getGLId (void) const |
| Get the value of the ProgramChunk::_sfGLId field. | |
Field Set | |
| *void | setGLId (const UInt32 &value) |
| Set the value of the ProgramChunk::_sfGLId field. | |
Sync | |
| *void | executeSyncImpl (ProgramChunkBase *pOther, const BitVector &whichField) |
Protected Attributes | |
Fields | |
| *SFString | _sfProgram |
| MFVec4f | _mfParamValues |
| MFString | _mfParamNames |
| SFUInt32 | _sfGLId |
Fields | |
| *SFString | _sfProgram |
| MFVec4f | _mfParamValues |
| MFString | _mfParamNames |
| SFUInt32 | _sfGLId |
Fields | |
| *SFString | _sfProgram |
| MFVec4f | _mfParamValues |
| MFString | _mfParamNames |
| SFUInt32 | _sfGLId |
Private Types | |
| typedef ProgramChunk | Inherited |
Private Member Functions | |
| void | operator= (const FragmentProgramChunkBase &source) |
Static Private Attributes | |
| static FieldContainerType | _type |
Friends | |
| class | FieldContainer |
Definition at line 80 of file OSGFragmentProgramChunkBase.h.
|
|
Reimplemented from osg::ProgramChunk. Reimplemented in osg::FragmentProgramChunk. Definition at line 84 of file OSGFragmentProgramChunkBase.h. |
|
|
Reimplemented from osg::ProgramChunkBase. Definition at line 89 of file OSGFragmentProgramChunkBase.h. |
|
|
Reimplemented from osg::Attachment. Definition at line 95 of file OSGProgramChunkBase.h. 00096 { 00097 ProgramFieldId = Inherited::NextFieldId, 00098 ParamValuesFieldId = ProgramFieldId + 1, 00099 ParamNamesFieldId = ParamValuesFieldId + 1, 00100 GLIdFieldId = ParamNamesFieldId + 1, 00101 NextFieldId = GLIdFieldId + 1 00102 };
|
|
|
Definition at line 144 of file OSGFragmentProgramChunkBase.cpp. 00144 : 00145 Inherited() 00146 { 00147 }
|
|
|
Definition at line 153 of file OSGFragmentProgramChunkBase.cpp. 00153 : 00154 Inherited (source) 00155 { 00156 }
|
|
|
Definition at line 160 of file OSGFragmentProgramChunkBase.cpp.
|
|
|
Reimplemented from osg::ProgramChunkBase. Definition at line 58 of file OSGFragmentProgramChunkBase.inl. References _type. Referenced by create(), and osg::RemoteAspect::RemoteAspect(). 00059 { 00060 return _type; 00061 }
|
|
|
Reimplemented from osg::ProgramChunkBase. Definition at line 65 of file OSGFragmentProgramChunkBase.inl. References _type, and osg::TypeBase::getId(). 00066 { 00067 return _type.getId(); 00068 }
|
|
|
Reimplemented from osg::ProgramChunkBase. Definition at line 86 of file OSGFragmentProgramChunkBase.cpp. References _type. 00087 { 00088 return _type; 00089 }
|
|
|
Reimplemented from osg::ProgramChunkBase. Definition at line 91 of file OSGFragmentProgramChunkBase.cpp. References _type. 00092 { 00093 return _type; 00094 }
|
|
|
Reimplemented from osg::ProgramChunkBase. Definition at line 106 of file OSGFragmentProgramChunkBase.cpp. 00107 { 00108 return sizeof(FragmentProgramChunk); 00109 }
|
|
|
Reimplemented from osg::ProgramChunkBase. Definition at line 166 of file OSGFragmentProgramChunkBase.cpp. References osg::ProgramChunkBase::getBinSize(). 00167 { 00168 UInt32 returnValue = Inherited::getBinSize(whichField); 00169 00170 00171 return returnValue; 00172 }
|
|
||||||||||||
|
Reimplemented from osg::ProgramChunkBase. Definition at line 174 of file OSGFragmentProgramChunkBase.cpp. References osg::ProgramChunkBase::copyToBin(). 00176 { 00177 Inherited::copyToBin(pMem, whichField); 00178 00179 00180 }
|
|
||||||||||||
|
Reimplemented from osg::ProgramChunkBase. Definition at line 182 of file OSGFragmentProgramChunkBase.cpp. References osg::ProgramChunkBase::copyFromBin(). 00184 { 00185 Inherited::copyFromBin(pMem, whichField); 00186 00187 00188 }
|
|
|
Reimplemented from osg::Attachment. Definition at line 72 of file OSGFragmentProgramChunkBase.inl. References osg::AttachmentPtr::dcast(), getClassType(), osg::FieldContainerType::getPrototype(), osg::NullFC, and shallowCopy(). Referenced by osg::DVRSimpleLUTShader::activate(), osg::DVRIsoShader::activate_FragmentProgramShading(), osg::PhongMaterial::createChunkMaterial(), osg::DisplayCalibration::createCMViewports(), and osg::PhongMaterial::prepareLocalChunks(). 00073 { 00074 FragmentProgramChunkPtr fc; 00075 00076 if(getClassType().getPrototype() != OSG::NullFC) 00077 { 00078 fc = FragmentProgramChunkPtr::dcast( 00079 getClassType().getPrototype()-> shallowCopy()); 00080 } 00081 00082 return fc; 00083 }
|
|
|
Reimplemented from osg::Attachment. Definition at line 87 of file OSGFragmentProgramChunkBase.inl. References osg::FieldContainer::newPtr(). 00088 { 00089 FragmentProgramChunkPtr returnValue; 00090 00091 newPtr(returnValue); 00092 00093 return returnValue; 00094 }
|
|
|
Reimplemented from osg::Attachment. Definition at line 97 of file OSGFragmentProgramChunkBase.cpp. References osg::FieldContainer::newPtr(). Referenced by create(). 00098 { 00099 FragmentProgramChunkPtr returnValue; 00100 00101 newPtr(returnValue, dynamic_cast<const FragmentProgramChunk *>(this)); 00102 00103 return returnValue; 00104 }
|
|
||||||||||||
|
Definition at line 191 of file OSGFragmentProgramChunkBase.cpp. References osg::ProgramChunkBase::executeSyncImpl(). Referenced by executeSync(). 00193 { 00194 00195 Inherited::executeSyncImpl(pOther, whichField); 00196 00197 00198 }
|
|
||||||||||||
|
Reimplemented from osg::ProgramChunkBase. Definition at line 113 of file OSGFragmentProgramChunkBase.cpp. References executeSyncImpl(). 00115 { 00116 this->executeSyncImpl((FragmentProgramChunkBase *) &other, whichField); 00117 }
|
|
|
|
|
|
Reimplemented from osg::StateChunk. Reimplemented in osg::FragmentProgramChunk, and osg::VertexProgramChunk. Definition at line 149 of file OSGProgramChunk.cpp. References osg::ProgramChunk::_class. 00150 { 00151 return &_class; 00152 }
|
|
|
Reimplemented from osg::StateChunk. Reimplemented in osg::FragmentProgramChunk, and osg::VertexProgramChunk. Definition at line 46 of file OSGProgramChunk.inl. References osg::StateChunkClass::getId(), and osg::ProgramChunk::getStaticClass(). 00047 { 00048 return getStaticClass()->getId(); 00049 }
|
|
|
Reimplemented from osg::StateChunk. Reimplemented in osg::FragmentProgramChunk, and osg::VertexProgramChunk. Definition at line 52 of file OSGProgramChunk.inl. References osg::ProgramChunk::_class. Referenced by osg::ProgramChunk::getStaticClassId(). 00053 { 00054 return &ProgramChunk::_class; 00055 }
|
|
||||||||||||
|
Reimplemented from osg::StateChunk. Reimplemented in osg::FatBorderChunk, osg::FragmentProgramChunk, and osg::VertexProgramChunk. Definition at line 156 of file OSGProgramChunk.cpp. |