#include <OSGSHLChunkBase.h>
Inheritance diagram for osg::SHLChunkBase:

Public Types | |
| typedef SHLChunkPtr | Ptr |
| enum | { CgFrontEndFieldId = Inherited::NextFieldId, GLIdFieldId = CgFrontEndFieldId + 1, NextFieldId = GLIdFieldId + 1 } |
Public Member Functions | |
Field Get | |
| *SFString * | getSFVertexProgram (void) |
| Get the ShaderChunk::_sfVertexProgram field. | |
| SFString * | getSFFragmentProgram (void) |
| Get the ShaderChunk::_sfFragmentProgram field. | |
| std::string & | getVertexProgram (void) |
| Get the value of the ShaderChunk::_sfVertexProgram field. | |
| const std::string & | getVertexProgram (void) const |
| Get the value of the ShaderChunk::_sfVertexProgram field. | |
| std::string & | getFragmentProgram (void) |
| Get the value of the ShaderChunk::_sfFragmentProgram field. | |
| const std::string & | getFragmentProgram (void) const |
| Get the value of the ShaderChunk::_sfFragmentProgram field. | |
Field Set | |
| *void | setVertexProgram (const std::string &value) |
| Set the value of the ShaderChunk::_sfVertexProgram field. | |
| void | setFragmentProgram (const std::string &value) |
| Set the value of the ShaderChunk::_sfFragmentProgram field. | |
ShaderParameterChunk Access | |
| *bool | setUniformParameter (const char *name, bool value) |
| bool | setUniformParameter (const char *name, Int32 value) |
| bool | setUniformParameter (const char *name, Real32 value) |
| bool | setUniformParameter (const char *name, const Vec2f &value) |
| bool | setUniformParameter (const char *name, const Vec3f &value) |
| bool | setUniformParameter (const char *name, const Vec4f &value) |
| bool | setUniformParameter (const char *name, const Matrix &value) |
| bool | getUniformParameter (const char *name, bool &value) |
| bool | getUniformParameter (const char *name, Int32 &value) |
| bool | getUniformParameter (const char *name, Real32 &value) |
| bool | getUniformParameter (const char *name, Vec2f &value) |
| bool | getUniformParameter (const char *name, Vec3f &value) |
| bool | getUniformParameter (const char *name, Vec4f &value) |
| bool | getUniformParameter (const char *name, Matrix &value) |
| bool | subUniformParameter (const char *name) |
Field Get | |
| *MFShaderParameterPtr * | getMFParameters (void) |
| Get the ShaderParameterChunk::_mfParameters field. | |
| ShaderParameterPtr & | getParameters (const UInt32 index) |
| Get the value of the index element the ShaderParameterChunk::_mfParameters field. | |
| MFShaderParameterPtr & | getParameters (void) |
| Get the ShaderParameterChunk::_mfParameters field. | |
| const MFShaderParameterPtr & | getParameters (void) const |
| Get the ShaderParameterChunk::_mfParameters field. | |
Chunk Class Access | |
| *UInt32 | getClassId (void) const |
| virtual const StateChunkClass * | getClass (void) const |
State | |
| *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 |
Parents | |
| *MFFieldContainerPtr & | getParents (void) |
| const MFFieldContainerPtr & | getParents (void) const |
| MFFieldContainerPtr * | getMFParents (void) |
| void | addParent (FieldContainerPtr parent) |
| void | subParent (FieldContainerPtr parent) |
| Int32 | findParent (FieldContainerPtr parent) |
Parents | |
| *SFBool & | getInternal (void) |
| const SFBool & | getInternal (void) const |
| SFBool * | getSFInternal (void) |
| void | setInternal (bool bVal) |
FieldContainer Get | |
| *virtual FieldContainerType & | getType (void) |
| virtual const FieldContainerType & | getType (void) const |
| virtual UInt32 | getContainerSize (void) const |
Field Get | |
| *SFBool * | getSFCgFrontEnd (void) |
| Get the SHLChunk::_sfCgFrontEnd field. | |
| SFUInt32 * | getSFGLId (void) |
| Get the SHLChunk::_sfGLId field. | |
| bool & | getCgFrontEnd (void) |
| Get the value of the SHLChunk::_sfCgFrontEnd field. | |
| const bool & | getCgFrontEnd (void) const |
| Get the value of the SHLChunk::_sfCgFrontEnd field. | |
| UInt32 & | getGLId (void) |
| Get the value of the SHLChunk::_sfGLId field. | |
| const UInt32 & | getGLId (void) const |
| Get the value of the SHLChunk::_sfGLId field. | |
Field Set | |
| *void | setCgFrontEnd (const bool &value) |
| Set the value of the SHLChunk::_sfCgFrontEnd field. | |
| void | setGLId (const UInt32 &value) |
| Set the value of the SHLChunk::_sfGLId field. | |
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 |
Sync | |
| *virtual void | changed (BitVector whichField, UInt32 origin) |
Output | |
| *virtual void | dump (UInt32 uiIndent=0, const BitVector bvFlags=0) const |
ShaderChunk Access | |
| *bool | readVertexProgram (const char *file) |
| bool | readVertexProgram (std::istream &stream) |
| bool | readFragmentProgram (const char *file) |
| bool | readFragmentProgram (std::istream &stream) |
Field Get | |
| *SFString * | getSFVertexProgram (void) |
| Get the ShaderChunk::_sfVertexProgram field. | |
| SFString * | getSFFragmentProgram (void) |
| Get the ShaderChunk::_sfFragmentProgram field. | |
| std::string & | getVertexProgram (void) |
| Get the value of the ShaderChunk::_sfVertexProgram field. | |
| const std::string & | getVertexProgram (void) const |
| Get the value of the ShaderChunk::_sfVertexProgram field. | |
| std::string & | getFragmentProgram (void) |
| Get the value of the ShaderChunk::_sfFragmentProgram field. | |
| const std::string & | getFragmentProgram (void) const |
| Get the value of the ShaderChunk::_sfFragmentProgram field. | |
Field Set | |
| *void | setVertexProgram (const std::string &value) |
| Set the value of the ShaderChunk::_sfVertexProgram field. | |
| void | setFragmentProgram (const std::string &value) |
| Set the value of the ShaderChunk::_sfFragmentProgram field. | |
ShaderParameterChunk Access | |
| *bool | setUniformParameter (const char *name, bool value) |
| bool | setUniformParameter (const char *name, Int32 value) |
| bool | setUniformParameter (const char *name, Real32 value) |
| bool | setUniformParameter (const char *name, const Vec2f &value) |
| bool | setUniformParameter (const char *name, const Vec3f &value) |
| bool | setUniformParameter (const char *name, const Vec4f &value) |
| bool | setUniformParameter (const char *name, const Matrix &value) |
| bool | getUniformParameter (const char *name, bool &value) |
| bool | getUniformParameter (const char *name, Int32 &value) |
| bool | getUniformParameter (const char *name, Real32 &value) |
| bool | getUniformParameter (const char *name, Vec2f &value) |
| bool | getUniformParameter (const char *name, Vec3f &value) |
| bool | getUniformParameter (const char *name, Vec4f &value) |
| bool | getUniformParameter (const char *name, Matrix &value) |
| bool | subUniformParameter (const char *name) |
Field Get | |
| *MFShaderParameterPtr * | getMFParameters (void) |
| Get the ShaderParameterChunk::_mfParameters field. | |
| ShaderParameterPtr & | getParameters (const UInt32 index) |
| Get the value of the index element the ShaderParameterChunk::_mfParameters field. | |
| MFShaderParameterPtr & | getParameters (void) |
| Get the ShaderParameterChunk::_mfParameters field. | |
| const MFShaderParameterPtr & | getParameters (void) const |
| Get the ShaderParameterChunk::_mfParameters field. | |
Chunk Class Access | |
| *UInt32 | getClassId (void) const |
| virtual const StateChunkClass * | getClass (void) const |
State | |
| *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 |
Parents | |
| *MFFieldContainerPtr & | getParents (void) |
| const MFFieldContainerPtr & | getParents (void) const |
| MFFieldContainerPtr * | getMFParents (void) |
| void | addParent (FieldContainerPtr parent) |
| void | subParent (FieldContainerPtr parent) |
| Int32 | findParent (FieldContainerPtr parent) |
Parents | |
| *SFBool & | getInternal (void) |
| const SFBool & | getInternal (void) const |
| SFBool * | getSFInternal (void) |
| void | setInternal (bool bVal) |
Static Public Member Functions | |
Static Chunk Class Access | |
| *static UInt32 | getStaticClassId (void) |
| static const StateChunkClass * | getStaticClass (void) |
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 SHLChunkPtr | create (void) |
| create a new instance of the class | |
| static SHLChunkPtr | 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 Public Attributes | |
| static const osg::BitVector | CgFrontEndFieldMask |
| static const osg::BitVector | GLIdFieldMask |
| static const osg::BitVector | MTInfluenceMask |
| static const osg::BitVector | VertexProgramFieldMask |
| static const osg::BitVector | FragmentProgramFieldMask |
| static const osg::BitVector | ParametersFieldMask |
| static const BitVector | InternalFieldMask = (1 << Attachment::InternalFieldId) |
| static const BitVector | ParentsFieldMask = (1 << Attachment::ParentsFieldId) |
| static const BitVector | NextFieldMask |
Protected Member Functions | |
| void | onCreate (const ShaderParameterChunk *source=NULL) |
| void | onDestroy (void) |
Sync | |
| *void | executeSyncImpl (ShaderParameterChunkBase *pOther, const BitVector &whichField) |
Sync | |
| *void | executeSyncImpl (StateChunkBase *pOther, const BitVector &whichField) |
Sync | |
| void | executeSyncImpl (Attachment *pOther, const BitVector &whichField) |
Constructors | |
| * | SHLChunkBase (void) |
| SHLChunkBase (const SHLChunkBase &source) | |
Destructors | |
| *virtual | ~SHLChunkBase (void) |
Sync | |
| *void | executeSyncImpl (SHLChunkBase *pOther, const BitVector &whichField) |
| virtual void | executeSync (FieldContainer &other, const BitVector &whichField) |
Sync | |
| *void | executeSyncImpl (ShaderChunkBase *pOther, const BitVector &whichField) |
Sync | |
| *void | executeSyncImpl (ShaderParameterChunkBase *pOther, const BitVector &whichField) |
Sync | |
| *void | executeSyncImpl (StateChunkBase *pOther, const BitVector &whichField) |
Sync | |
| void | executeSyncImpl (Attachment *pOther, const BitVector &whichField) |
Protected Attributes | |
Fields | |
| *SFString | _sfVertexProgram |
| SFString | _sfFragmentProgram |
Parameter Access | |
| *ShaderParameterAccess * | _parameter_access |
Fields | |
| *MFShaderParameterPtr | _mfParameters |
Fields | |
| *SFBool | _sfInternal |
| MFFieldContainerPtr | _parents |
Fields | |
| *SFBool | _sfCgFrontEnd |
| SFUInt32 | _sfGLId |
Fields | |
| *SFString | _sfVertexProgram |
| SFString | _sfFragmentProgram |
Parameter Access | |
| *ShaderParameterAccess * | _parameter_access |
Fields | |
| *MFShaderParameterPtr | _mfParameters |
Fields | |
| *SFBool | _sfInternal |
| MFFieldContainerPtr | _parents |
Private Types | |
| typedef ShaderChunk | Inherited |
Private Member Functions | |
| void | operator= (const SHLChunkBase &source) |
Static Private Attributes | |
| static FieldDescription * | _desc [] |
| SHLChunk description. | |
| static FieldContainerType | _type |
Friends | |
| class | FieldContainer |
Definition at line 82 of file OSGSHLChunkBase.h.
|
|
Reimplemented from osg::ShaderChunk. Reimplemented in osg::SHLChunk. Definition at line 86 of file OSGSHLChunkBase.h. |
|
|
Reimplemented from osg::ShaderChunkBase. Definition at line 91 of file OSGSHLChunkBase.h. |
|
|
Reimplemented from osg::ShaderChunkBase. Definition at line 93 of file OSGSHLChunkBase.h. 00094 { 00095 CgFrontEndFieldId = Inherited::NextFieldId, 00096 GLIdFieldId = CgFrontEndFieldId + 1, 00097 NextFieldId = GLIdFieldId + 1 00098 };
|
|
|
Definition at line 175 of file OSGSHLChunkBase.cpp. 00175 : 00176 _sfCgFrontEnd (bool(false)), 00177 _sfGLId (), 00178 Inherited() 00179 { 00180 }
|
|
|
Definition at line 186 of file OSGSHLChunkBase.cpp. 00186 : 00187 _sfCgFrontEnd (source._sfCgFrontEnd ), 00188 _sfGLId (source._sfGLId ), 00189 Inherited (source) 00190 { 00191 }
|
|
|
Definition at line 195 of file OSGSHLChunkBase.cpp.
|
|
|
Reimplemented from osg::ShaderChunkBase. Definition at line 58 of file OSGSHLChunkBase.inl. References _type. Referenced by create(), and osg::SHLChunk::onCreate(). 00059 { 00060 return _type; 00061 }
|
|
|
Reimplemented from osg::ShaderChunkBase. Definition at line 65 of file OSGSHLChunkBase.inl. References _type, and osg::TypeBase::getId(). 00066 { 00067 return _type.getId(); 00068 }
|
|
|
Reimplemented from osg::ShaderChunkBase. Definition at line 117 of file OSGSHLChunkBase.cpp. References _type. 00118 { 00119 return _type; 00120 }
|
|
|
Reimplemented from osg::ShaderChunkBase. Definition at line 122 of file OSGSHLChunkBase.cpp. References _type. 00123 { 00124 return _type; 00125 }
|
|
|
Reimplemented from osg::ShaderChunkBase. Definition at line 137 of file OSGSHLChunkBase.cpp. 00138 { 00139 return sizeof(SHLChunk); 00140 }
|
|
|
Definition at line 101 of file OSGSHLChunkBase.inl. References _sfCgFrontEnd. 00102 { 00103 return &_sfCgFrontEnd; 00104 }
|
|
|
Definition at line 108 of file OSGSHLChunkBase.inl. References _sfGLId. 00109 { 00110 return &_sfGLId; 00111 }
|
|
|
Definition at line 116 of file OSGSHLChunkBase.inl. References _sfCgFrontEnd, and osg::SField< FieldTypeT, fieldNameSpace >::getValue(). Referenced by osg::SHLChunk::updateProgram(). 00117 { 00118 return _sfCgFrontEnd.getValue(); 00119 }
|
|
|
Definition at line 123 of file OSGSHLChunkBase.inl. References _sfCgFrontEnd, and osg::SField< FieldTypeT, fieldNameSpace >::getValue(). 00124 { 00125 return _sfCgFrontEnd.getValue(); 00126 }
|
|
|
Definition at line 137 of file OSGSHLChunkBase.inl. References _sfGLId, and osg::SField< FieldTypeT, fieldNameSpace >::getValue(). Referenced by osg::SHLChunk::activate(), osg::SHLChunk::changed(), osg::SHLChunk::changeFrom(), osg::SHLChunk::deactivate(), osg::SHLChunk::onDestroy(), osg::SHLChunk::updateParameters(), and osg::SHLChunk::updateProgram(). 00138 { 00139 return _sfGLId.getValue(); 00140 }
|
|
|
Definition at line 144 of file OSGSHLChunkBase.inl. References _sfGLId, and osg::SField< FieldTypeT, fieldNameSpace >::getValue(). 00145 { 00146 return _sfGLId.getValue(); 00147 }
|
|
|
Definition at line 130 of file OSGSHLChunkBase.inl. References _sfCgFrontEnd, and osg::SField< FieldTypeT, fieldNameSpace >::setValue(). 00131 { 00132 _sfCgFrontEnd.setValue(value); 00133 }
|
|
|
Definition at line 151 of file OSGSHLChunkBase.inl. References _sfGLId, and osg::SField< FieldTypeT, fieldNameSpace >::setValue(). Referenced by osg::SHLChunk::onCreate().
|
|
|
Reimplemented from osg::ShaderChunkBase. Definition at line 201 of file OSGSHLChunkBase.cpp. References _sfCgFrontEnd, _sfGLId, CgFrontEndFieldMask, osg::SField< FieldTypeT, fieldNameSpace >::getBinSize(), osg::ShaderChunkBase::getBinSize(), GLIdFieldMask, and osg::FieldBits::NoField. 00202 { 00203 UInt32 returnValue = Inherited::getBinSize(whichField); 00204 00205 if(FieldBits::NoField != (CgFrontEndFieldMask & whichField)) 00206 { 00207 returnValue += _sfCgFrontEnd.getBinSize(); 00208 } 00209 00210 if(FieldBits::NoField != (GLIdFieldMask & whichField)) 00211 { 00212 returnValue += _sfGLId.getBinSize(); 00213 } 00214 00215 00216 return returnValue; 00217 }
|
|
||||||||||||
|
Reimplemented from osg::ShaderChunkBase. Definition at line 219 of file OSGSHLChunkBase.cpp. References _sfCgFrontEnd, _sfGLId, CgFrontEndFieldMask, osg::SField< FieldTypeT, fieldNameSpace >::copyToBin(), osg::ShaderChunkBase::copyToBin(), GLIdFieldMask, and osg::FieldBits::NoField. 00221 { 00222 Inherited::copyToBin(pMem, whichField); 00223 00224 if(FieldBits::NoField != (CgFrontEndFieldMask & whichField)) 00225 { 00226 _sfCgFrontEnd.copyToBin(pMem); 00227 } 00228 00229 if(FieldBits::NoField != (GLIdFieldMask & whichField)) 00230 { 00231 _sfGLId.copyToBin(pMem); 00232 } 00233 00234 00235 }
|
|
||||||||||||
|
Reimplemented from osg::ShaderChunkBase. Definition at line 237 of file OSGSHLChunkBase.cpp. References _sfCgFrontEnd, _sfGLId, CgFrontEndFieldMask, osg::SField< FieldTypeT, fieldNameSpace >::copyFromBin(), osg::ShaderChunkBase::copyFromBin(), GLIdFieldMask, and osg::FieldBits::NoField. 00239 { 00240 Inherited::copyFromBin(pMem, whichField); 00241 00242 if(FieldBits::NoField != (CgFrontEndFieldMask & whichField)) 00243 { 00244 _sfCgFrontEnd.copyFromBin(pMem); 00245 } 00246 00247 if(FieldBits::NoField != (GLIdFieldMask & whichField)) 00248 { 00249 _sfGLId.copyFromBin(pMem); 00250 } 00251 00252 00253 }
|
|
|
Reimplemented from osg::Attachment. Definition at line 72 of file OSGSHLChunkBase.inl. References osg::AttachmentPtr::dcast(), getClassType(), osg::FieldContainerType::getPrototype(), osg::NullFC, and shallowCopy(). 00073 { 00074 SHLChunkPtr fc; 00075 00076 if(getClassType().getPrototype() != OSG::NullFC) 00077 { 00078 fc = SHLChunkPtr::dcast( 00079 getClassType().getPrototype()-> shallowCopy()); 00080 } 00081 00082 return fc; 00083 }
|
|
|
Reimplemented from osg::Attachment. Definition at line 87 of file OSGSHLChunkBase.inl. References osg::FieldContainer::newPtr(). 00088 { 00089 SHLChunkPtr returnValue; 00090 00091 newPtr(returnValue); 00092 00093 return returnValue; 00094 }
|
|
|
Reimplemented from osg::Attachment. Definition at line 128 of file OSGSHLChunkBase.cpp. References osg::FieldContainer::newPtr(). Referenced by create(). 00129 { 00130 SHLChunkPtr returnValue; 00131 00132 newPtr(returnValue, dynamic_cast<const SHLChunk *>(this)); 00133 00134 return returnValue; 00135 }
|
|
||||||||||||
|
Definition at line 256 of file OSGSHLChunkBase.cpp. References _sfCgFrontEnd, _sfGLId, CgFrontEndFieldMask, osg::ShaderChunkBase::executeSyncImpl(), GLIdFieldMask, osg::FieldBits::NoField, and osg::SField< FieldTypeT, fieldNameSpace >::syncWith(). Referenced by executeSync(). 00258 { 00259 00260 Inherited::executeSyncImpl(pOther, whichField); 00261 00262 if(FieldBits::NoField != (CgFrontEndFieldMask & whichField)) 00263 _sfCgFrontEnd.syncWith(pOther->_sfCgFrontEnd); 00264 00265 if(FieldBits::NoField != (GLIdFieldMask & whichField)) 00266 _sfGLId.syncWith(pOther->_sfGLId); 00267 00268 00269 }
|
|
||||||||||||
|
Reimplemented from osg::ShaderChunkBase. Definition at line 144 of file OSGSHLChunkBase.cpp. References executeSyncImpl(). 00146 { 00147 this->executeSyncImpl((SHLChunkBase *) &other, whichField); 00148 }
|
|
|
|
|
||||||||||||
|
|