#include <OSGShaderChunkBase.h>
Inheritance diagram for osg::ShaderChunkBase:

General Fieldcontainer Declaration | |
| virtual osg::FieldContainerPtr | shallowCopy (void) const |
| static AttachmentPtr | create (void) |
| static AttachmentPtr | createEmpty (void) |
Sync | |
| *void | executeSyncImpl (ShaderChunkBase *pOther, const BitVector &whichField) |
| virtual void | executeSync (FieldContainer &other, const BitVector &whichField) |
Public Types | |
| typedef ShaderChunkPtr | Ptr |
| enum | { VertexProgramFieldId = Inherited::NextFieldId, FragmentProgramFieldId = VertexProgramFieldId + 1, NextFieldId = FragmentProgramFieldId + 1 } |
Public Member Functions | |
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) |
Sync | |
| *virtual void | changed (BitVector whichField, UInt32 origin) |
Output | |
| *virtual void | dump (UInt32 uiIndent=0, const BitVector bvFlags=0) const |
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 | |
Static Public Attributes | |
| static const osg::BitVector | VertexProgramFieldMask |
| static const osg::BitVector | FragmentProgramFieldMask |
| static const osg::BitVector | MTInfluenceMask |
| 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) |
Constructors | |
| * | ShaderChunkBase (void) |
| ShaderChunkBase (const ShaderChunkBase &source) | |
Destructors | |
| *virtual | ~ShaderChunkBase (void) |
Private Types | |
| typedef ShaderParameterChunk | Inherited |
Private Member Functions | |
| void | operator= (const ShaderChunkBase &source) |
Static Private Attributes | |
| static FieldDescription * | _desc [] |
| ShaderChunk description. | |
| static FieldContainerType | _type |
Friends | |
| class | FieldContainer |
Definition at line 82 of file OSGShaderChunkBase.h.
|
|
Reimplemented from osg::ShaderParameterChunk. Reimplemented in osg::ShaderChunk, osg::SHLChunk, and osg::SHLChunkBase. Definition at line 86 of file OSGShaderChunkBase.h. |
|
|
Reimplemented from osg::ShaderParameterChunkBase. Reimplemented in osg::SHLChunkBase. Definition at line 91 of file OSGShaderChunkBase.h. |
|
|
Reimplemented from osg::ShaderParameterChunkBase. Definition at line 93 of file OSGShaderChunkBase.h. 00094 { 00095 VertexProgramFieldId = Inherited::NextFieldId, 00096 FragmentProgramFieldId = VertexProgramFieldId + 1, 00097 NextFieldId = FragmentProgramFieldId + 1 00098 };
|
|
|
Definition at line 166 of file OSGShaderChunkBase.cpp. 00166 : 00167 _sfVertexProgram (), 00168 _sfFragmentProgram (), 00169 Inherited() 00170 { 00171 }
|
|
|
Definition at line 177 of file OSGShaderChunkBase.cpp. 00177 : 00178 _sfVertexProgram (source._sfVertexProgram ), 00179 _sfFragmentProgram (source._sfFragmentProgram ), 00180 Inherited (source) 00181 { 00182 }
|
|
|
Definition at line 186 of file OSGShaderChunkBase.cpp.
|
|
|
Reimplemented from osg::ShaderParameterChunkBase. Reimplemented in osg::SHLChunkBase. Definition at line 58 of file OSGShaderChunkBase.inl. References _type. 00059 { 00060 return _type; 00061 }
|
|
|
Reimplemented from osg::ShaderParameterChunkBase. Reimplemented in osg::SHLChunkBase. Definition at line 65 of file OSGShaderChunkBase.inl. References _type, and osg::TypeBase::getId(). 00066 { 00067 return _type.getId(); 00068 }
|
|
|
Reimplemented from osg::ShaderParameterChunkBase. Reimplemented in osg::SHLChunkBase. Definition at line 117 of file OSGShaderChunkBase.cpp. References _type. 00118 { 00119 return _type; 00120 }
|
|
|
Reimplemented from osg::ShaderParameterChunkBase. Reimplemented in osg::SHLChunkBase. Definition at line 122 of file OSGShaderChunkBase.cpp. References _type. 00123 { 00124 return _type; 00125 }
|
|
|
Reimplemented from osg::ShaderParameterChunkBase. Reimplemented in osg::SHLChunkBase. Definition at line 128 of file OSGShaderChunkBase.cpp. 00129 { 00130 return sizeof(ShaderChunk); 00131 }
|
|
|
Definition at line 75 of file OSGShaderChunkBase.inl. References _sfVertexProgram. 00076 { 00077 return &_sfVertexProgram; 00078 }
|
|
|
Definition at line 82 of file OSGShaderChunkBase.inl. References _sfFragmentProgram. 00083 { 00084 return &_sfFragmentProgram; 00085 }
|
|
|
Definition at line 90 of file OSGShaderChunkBase.inl. References _sfVertexProgram, and osg::SField< FieldTypeT, fieldNameSpace >::getValue(). Referenced by osg::SHLChunk::operator==(), osg::ShaderChunk::readVertexProgram(), and osg::SHLChunk::updateProgram(). 00091 { 00092 return _sfVertexProgram.getValue(); 00093 }
|
|
|
Definition at line 97 of file OSGShaderChunkBase.inl. References _sfVertexProgram, and osg::SField< FieldTypeT, fieldNameSpace >::getValue(). 00098 { 00099 return _sfVertexProgram.getValue(); 00100 }
|
|
|
Definition at line 111 of file OSGShaderChunkBase.inl. References _sfFragmentProgram, and osg::SField< FieldTypeT, fieldNameSpace >::getValue(). Referenced by osg::SHLChunk::operator==(), osg::ShaderChunk::readFragmentProgram(), and osg::SHLChunk::updateProgram(). 00112 { 00113 return _sfFragmentProgram.getValue(); 00114 }
|
|
|
Definition at line 118 of file OSGShaderChunkBase.inl. References _sfFragmentProgram, and osg::SField< FieldTypeT, fieldNameSpace >::getValue(). 00119 { 00120 return _sfFragmentProgram.getValue(); 00121 }
|
|
|
Definition at line 104 of file OSGShaderChunkBase.inl. References _sfVertexProgram, and osg::SField< FieldTypeT, fieldNameSpace >::setValue(). 00105 { 00106 _sfVertexProgram.setValue(value); 00107 }
|
|
|
Definition at line 125 of file OSGShaderChunkBase.inl. References _sfFragmentProgram, and osg::SField< FieldTypeT, fieldNameSpace >::setValue(). 00126 { 00127 _sfFragmentProgram.setValue(value); 00128 }
|
|
|
Reimplemented from osg::ShaderParameterChunkBase. Reimplemented in osg::SHLChunkBase. Definition at line 192 of file OSGShaderChunkBase.cpp. References _sfFragmentProgram, _sfVertexProgram, FragmentProgramFieldMask, osg::SField< FieldTypeT, fieldNameSpace >::getBinSize(), osg::ShaderParameterChunkBase::getBinSize(), osg::FieldBits::NoField, and VertexProgramFieldMask. Referenced by osg::SHLChunkBase::getBinSize(). 00193 { 00194 UInt32 returnValue = Inherited::getBinSize(whichField); 00195 00196 if(FieldBits::NoField != (VertexProgramFieldMask & whichField)) 00197 { 00198 returnValue += _sfVertexProgram.getBinSize(); 00199 } 00200 00201 if(FieldBits::NoField != (FragmentProgramFieldMask & whichField)) 00202 { 00203 returnValue += _sfFragmentProgram.getBinSize(); 00204 } 00205 00206 00207 return returnValue; 00208 }
|
|
||||||||||||
|
Reimplemented from osg::ShaderParameterChunkBase. Reimplemented in osg::SHLChunkBase. Definition at line 210 of file OSGShaderChunkBase.cpp. References _sfFragmentProgram, _sfVertexProgram, osg::SField< FieldTypeT, fieldNameSpace >::copyToBin(), osg::ShaderParameterChunkBase::copyToBin(), FragmentProgramFieldMask, osg::FieldBits::NoField, and VertexProgramFieldMask. Referenced by osg::SHLChunkBase::copyToBin(). 00212 { 00213 Inherited::copyToBin(pMem, whichField); 00214 00215 if(FieldBits::NoField != (VertexProgramFieldMask & whichField)) 00216 { 00217 _sfVertexProgram.copyToBin(pMem); 00218 } 00219 00220 if(FieldBits::NoField != (FragmentProgramFieldMask & whichField)) 00221 { 00222 _sfFragmentProgram.copyToBin(pMem); 00223 } 00224 00225 00226 }
|
|
||||||||||||
|
Reimplemented from osg::ShaderParameterChunkBase. Reimplemented in osg::SHLChunkBase. Definition at line 228 of file OSGShaderChunkBase.cpp. References _sfFragmentProgram, _sfVertexProgram, osg::SField< FieldTypeT, fieldNameSpace >::copyFromBin(), osg::ShaderParameterChunkBase::copyFromBin(), FragmentProgramFieldMask, osg::FieldBits::NoField, and VertexProgramFieldMask. Referenced by osg::SHLChunkBase::copyFromBin(). 00230 { 00231 Inherited::copyFromBin(pMem, whichField); 00232 00233 if(FieldBits::NoField != (VertexProgramFieldMask & whichField)) 00234 { 00235 _sfVertexProgram.copyFromBin(pMem); 00236 } 00237 00238 if(FieldBits::NoField != (FragmentProgramFieldMask & whichField)) 00239 { 00240 _sfFragmentProgram.copyFromBin(pMem); 00241 } 00242 00243 00244 }
|
|
||||||||||||
|
Definition at line 247 of file OSGShaderChunkBase.cpp. References _sfFragmentProgram, _sfVertexProgram, osg::ShaderParameterChunkBase::executeSyncImpl(), FragmentProgramFieldMask, osg::FieldBits::NoField, osg::SField< FieldTypeT, fieldNameSpace >::syncWith(), and VertexProgramFieldMask. Referenced by executeSync(), and osg::SHLChunkBase::executeSyncImpl(). 00249 { 00250 00251 Inherited::executeSyncImpl(pOther, whichField); 00252 00253 if(FieldBits::NoField != (VertexProgramFieldMask & whichField)) 00254 _sfVertexProgram.syncWith(pOther->_sfVertexProgram); 00255 00256 if(FieldBits::NoField != (FragmentProgramFieldMask & whichField)) 00257 _sfFragmentProgram.syncWith(pOther->_sfFragmentProgram); 00258 00259 00260 }
|
|
||||||||||||
|
Reimplemented from osg::ShaderParameterChunkBase. Reimplemented in osg::SHLChunkBase. Definition at line 135 of file OSGShaderChunkBase.cpp. References executeSyncImpl(). 00137 { 00138 this->executeSyncImpl((ShaderChunkBase *) &other, whichField); 00139 }
|
|
|
|
|
||||||||||||
|
Reimplemented from osg::StateChunk. Reimplemented in osg::ShaderChunk, osg::SHLChunk, and osg::SHLParameterChunk. Definition at line 129 of file OSGShaderParameterChunk.cpp. References osg::StateChunk::changed(). Referenced by osg::SHLParameterChunk::changed(), and osg::ShaderChunk::changed(). 00130 { 00131 Inherited::changed(whichField, origin); 00132 }
|
|
||||||||||||
|
Reimplemented from osg::StateChunk. Reimplemented in osg::ShaderChunk, osg::SHLChunk, and osg::SHLParameterChunk. Definition at line 134 of file OSGShaderParameterChunk.cpp. References SLOG. 00136 { 00137 SLOG << "Dump ShaderParameterChunk NI" << std::endl; 00138 }
|
|
||||||||||||
|
Definition at line 145 of file OSGShaderParameterChunk.cpp. References osg::ShaderParameterChunk::_parameter_access, and osg::ShaderParameterAccess::setParameter(). Referenced by osg::SHLChunk::addParameterCallback(). 00146 { 00147 return _parameter_access->setParameter<ShaderParameterBool>(name, value); 00148 }
|
|
||||||||||||
|
Definition at line 150 of file OSGShaderParameterChunk.cpp. References osg::ShaderParameterChunk::_parameter_access, and osg::ShaderParameterAccess::setParameter(). 00151 { 00152 return _parameter_access->setParameter<ShaderParameterInt>(name, value); 00153 }
|
|
||||||||||||
|
Definition at line 155 of file OSGShaderParameterChunk.cpp. References osg::ShaderParameterChunk::_parameter_access, and osg::ShaderParameterAccess::setParameter(). 00156 { 00157 return _parameter_access->setParameter<ShaderParameterReal>(name, value); 00158 }
|
|
||||||||||||
|
Definition at line 160 of file OSGShaderParameterChunk.cpp. References osg::ShaderParameterChunk::_parameter_access, and osg::ShaderParameterAccess::setParameter(). 00161 { 00162 return _parameter_access->setParameter<ShaderParameterVec2f>(name, value); 00163 }
|
|
||||||||||||
|
Definition at line 165 of file OSGShaderParameterChunk.cpp. References osg::ShaderParameterChunk::_parameter_access, and osg::ShaderParameterAccess::setParameter(). 00166 { 00167 return _parameter_access->setParameter<ShaderParameterVec3f>(name, value); 00168 }
|
|
||||||||||||
|
Definition at line 170 of file OSGShaderParameterChunk.cpp. References osg::ShaderParameterChunk::_parameter_access, and osg::ShaderParameterAccess::setParameter(). 00171 { 00172 return _parameter_access->setParameter<ShaderParameterVec4f>(name, value); 00173 }
|
|
||||||||||||
|
Definition at line 175 of file OSGShaderParameterChunk.cpp. References osg::ShaderParameterChunk::_parameter_access, and osg::ShaderParameterAccess::setParameter(). 00176 { 00177 return _parameter_access->setParameter<ShaderParameterMatrix>(name, value); 00178 }
|
|
||||||||||||
|
Definition at line 182 of file OSGShaderParameterChunk.cpp. References osg::ShaderParameterChunk::_parameter_access, and osg::ShaderParameterAccess::getParameter(). 00183 { 00184 return _parameter_access->getParameter<ShaderParameterBool>(name, value); 00185 }
|
|
||||||||||||
|
Definition at line 187 of file OSGShaderParameterChunk.cpp. References osg::ShaderParameterChunk::_parameter_access, and osg::ShaderParameterAccess::getParameter(). 00188 { 00189 return _parameter_access->getParameter<ShaderParameterInt>(name, value); 00190 }
|
|
||||||||||||
|
Definition at line 192 of file OSGShaderParameterChunk.cpp. References osg::ShaderParameterChunk::_parameter_access, and osg::ShaderParameterAccess::getParameter(). 00193 { 00194 return _parameter_access->getParameter<ShaderParameterReal>(name, value); 00195 }
|
|
||||||||||||
|
Definition at line 197 of file OSGShaderParameterChunk.cpp. References osg::ShaderParameterChunk::_parameter_access, and osg::ShaderParameterAccess::getParameter(). 00198 { 00199 return _parameter_access->getParameter<ShaderParameterVec2f>(name, value); 00200 }
|
|
||||||||||||
|
Definition at line 202 of file OSGShaderParameterChunk.cpp. References osg::ShaderParameterChunk::_parameter_access, and osg::ShaderParameterAccess::getParameter(). 00203 { 00204 return _parameter_access->getParameter<ShaderParameterVec3f>(name, value); 00205 }
|
|
||||||||||||
|
Definition at line 207 of file OSGShaderParameterChunk.cpp. References osg::ShaderParameterChunk::_parameter_access, and osg::ShaderParameterAccess::getParameter(). 00208 { 00209 return _parameter_access->getParameter<ShaderParameterVec4f>(name, value); 00210 }
|
|
||||||||||||
|
Definition at line 212 of file OSGShaderParameterChunk.cpp. References osg::ShaderParameterChunk::_parameter_access, and osg::ShaderParameterAccess::getParameter(). 00213 { 00214 return _parameter_access->getParameter<ShaderParameterMatrix>(name, value); 00215 }
|
|
|
Definition at line 217 of file OSGShaderParameterChunk.cpp. References osg::ShaderParameterChunk::_parameter_access, and osg::ShaderParameterAccess::subParameter(). 00218 { 00219 return _parameter_access->subParameter(name); 00220 }
|
|
|
Definition at line 108 of file OSGShaderParameterChunk.cpp. References osg::ShaderParameterChunk::_parameter_access, osg::ShaderParameterChunkBase::getParameters(), osg::GlobalSystemState, osg::FieldContainer::onCreate(), and osg::Startup. Referenced by osg::SHLChunk::onCreate(). 00109 { 00110 Inherited::onCreate(source); 00111 00112 // ignore prototypes. 00113 if(GlobalSystemState == Startup) 00114 return; 00115 00116 _parameter_access = new ShaderParameterAccess(getParameters()); 00117 }
|
|
|
Definition at line 318 of file OSGFieldContainerImpl.inl. Referenced by osg::ShaderParameterChunk::onCreate().
|
|
|
Reimplemented from osg::Attachment. Reimplemented in osg::SHLChunk. Definition at line 119 of file OSGShaderParameterChunk.cpp. References osg::ShaderParameterChunk::_parameter_access, and osg::Attachment::onDestroy(). Referenced by osg::SHLChunk::onDestroy(). 00120 { 00121 Inherited::onDestroy(); 00122 00123 if(_parameter_access != NULL) 00124 delete _parameter_access; 00125 }
|
|
|
Definition at line 75 of file OSGShaderParameterChunkBase.inl. References osg::ShaderParameterChunkBase::_mfParameters. 00076 { 00077 return &_mfParameters; 00078 }
|
|
|
Definition at line 84 of file OSGShaderParameterChunkBase.inl. References osg::ShaderParameterChunkBase::_mfParameters. Referenced by osg::SHLParameterChunk::operator==(), and osg::SHLChunk::operator==(). 00085 { 00086 return _mfParameters[index]; 00087 }
|
|
|
Definition at line 91 of file OSGShaderParameterChunkBase.inl. References osg::ShaderParameterChunkBase::_mfParameters. Referenced by osg::SHLChunk::checkOSGParameters(), osg::SHLChunk::handleGL(), osg::ShaderParameterChunk::onCreate(), osg::SHLParameterChunk::operator==(), osg::SHLChunk::operator==(), osg::SHLParameterChunk::updateParameters(), and osg::SHLChunk::updateProgram(). 00092 { 00093 return _mfParameters; 00094 }
|
|
|
Definition at line 98 of file OSGShaderParameterChunkBase.inl. References osg::ShaderParameterChunkBase::_mfParameters. 00099 { 00100 return _mfParameters; 00101 }
|
|
||||||||||||
|
Definition at line 220 of file OSGShaderParameterChunkBase.cpp. References osg::ShaderParameterChunkBase::_mfParameters, osg::StateChunkBase::executeSyncImpl(), osg::FieldBits::NoField, osg::ShaderParameterChunkBase::ParametersFieldMask, and osg::MField< FieldTypeT, fieldNameSpace >::syncWith(). Referenced by osg::ShaderParameterChunkBase::executeSync(), osg::SHLParameterChunkBase::executeSyncImpl(), and executeSyncImpl(). 00222 { 00223 00224 Inherited::executeSyncImpl(pOther, whichField); 00225 00226 if(FieldBits::NoField != (ParametersFieldMask & whichField)) 00227 _mfParameters.syncWith(pOther->_mfParameters); 00228 00229 00230 }
|
|
||||||||||||