#include <OSGVertexProgramChunk.h>

Public Types | |
| typedef VertexProgramChunkPtr | Ptr |
| enum | { ProgramFieldId = Inherited::NextFieldId, ParamValuesFieldId = ProgramFieldId + 1, ParamNamesFieldId = ParamValuesFieldId + 1, GLIdFieldId = ParamNamesFieldId + 1, NextFieldId = GLIdFieldId + 1 } |
| enum | { IgnoreFieldId = Inherited::NextFieldId, NextFieldId = IgnoreFieldId + 1 } |
| enum | { ParentsFieldId = Inherited::NextFieldId, InternalFieldId = ParentsFieldId + 1, NextFieldId = InternalFieldId + 1 } |
| enum | { NextFieldId = 1 } |
Public Member Functions | |
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 |
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 |
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 | |
| UInt32 | getClassId (void) const |
State | |
| virtual void | update (DrawActionBase *action) |
Field Get | |
| SFBool * | getSFIgnore (void) |
| Get the StateChunk::_sfIgnore field. | |
| bool & | getIgnore (void) |
| Get the value of the StateChunk::_sfIgnore field. | |
| const bool & | getIgnore (void) const |
| Get the value of the StateChunk::_sfIgnore field. | |
Field Set | |
| void | setIgnore (const bool &value) |
| Set the value of the StateChunk::_sfIgnore field. | |
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) |
Get Instance Type Information | |
| UInt32 | getTypeId (void) const |
| UInt16 | getGroupId (void) const |
| const Char8 * | getTypeName (void) const |
| Field * | getField (UInt32 fieldId) |
| Field * | getField (const Char8 *fieldName) |
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 VertexProgramChunkPtr | create (void) |
| create a new instance of the class | |
| static VertexProgramChunkPtr | createEmpty (void) |
| create an empty new instance of the class, do not copy the prototype | |
Get Class Type Information | |
| static UInt16 | getClassGroupId (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 osg::BitVector | IgnoreFieldMask |
| static const BitVector | InternalFieldMask = (1 << Attachment::InternalFieldId) |
| static const BitVector | ParentsFieldMask = (1 << Attachment::ParentsFieldId) |
| static const BitVector | NextFieldMask |
CoredNodePtr helper | |
| static const bool | isNodeCore = false |
Protected Member Functions | |
Init | |
| void | onCreate (const VertexProgramChunk *source=NULL) |
Constructors | |
| VertexProgramChunk (void) | |
| VertexProgramChunk (const VertexProgramChunk &source) | |
Destructors | |
| virtual | ~VertexProgramChunk (void) |
Program-Specific Methods | |
| virtual UInt32 | getExtension (void) const |
| virtual GLenum | getTarget (void) const |
| virtual const char * | getTargetName (void) const |
Sync | |
| void | executeSyncImpl (VertexProgramChunkBase *pOther, const BitVector &whichField) |
| virtual void | executeSync (FieldContainer &other, const BitVector &whichField) |
Sync | |
| void | executeSyncImpl (ProgramChunkBase *pOther, const BitVector &whichField) |
Sync | |
| void | executeSyncImpl (StateChunkBase *pOther, const BitVector &whichField) |
Sync | |
| void | executeSyncImpl (Attachment *pOther, const BitVector &whichField) |
Sync | |
| void | executeSyncImpl (FieldContainer *pOther, const BitVector &whichField) |
Init | |
| void | onCreate (const ProgramChunk *source=NULL) |
MT Construction | |
| void | onCreate (const FieldContainer *source=NULL) |
| void | onCreateAspect (const FieldContainer *aspect0, const FieldContainer *source=NULL) |
Program-Specific Methods | |
| 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. | |
MT Destruction | |
| virtual void | onDestroy (void) |
MT Edit | |
| template<class FieldTypeT> | |
| void | beginEditX (const BitVector &whichField, FieldTypeT &field) |
| template<class FieldTypeT> | |
| void | endEditX (const BitVector &whichField, FieldTypeT &field) |
Static Protected Member Functions | |
Create Fieldcontainer | |
| template<class ObjectPtrT> | |
| static void | newPtr (ObjectPtrT &result, const typename ObjectPtrT::StoredObjectType *prototypeP) |
| template<class ObjectPtrT> | |
| static void | newPtr (ObjectPtrT &result) |
Protected Attributes | |
Fields | |
| SFString | _sfProgram |
| MFVec4f | _mfParamValues |
| MFString | _mfParamNames |
| SFUInt32 | _sfGLId |
Fields | |
| SFBool | _sfIgnore |
Fields | |
| SFBool | _sfInternal |
| MFFieldContainerPtr | _parents |
Member | |
| UInt32 | _shares |
Private Types | |
| typedef VertexProgramChunkBase | Inherited |
Private Member Functions | |
| void | operator= (const VertexProgramChunk &source) |
GL | |
| void | handleGL (Window *win, UInt32 id) |
Static Private Member Functions | |
| static void | initMethod (void) |
Static Private Attributes | |
| static StateChunkClass | _class |
OpenGL Extension Handling | |
| static UInt32 | _arbVertexProgram |
Friends | |
| class | FieldContainer |
| class | VertexProgramChunkBase |
Definition at line 55 of file OSGVertexProgramChunk.h.
typedef VertexProgramChunkBase osg::VertexProgramChunk::Inherited [private] |
Reimplemented from osg::VertexProgramChunkBase.
Reimplemented in osg::FatBorderChunk, and osg::FatBorderChunkBase.
Definition at line 59 of file OSGVertexProgramChunk.h.
typedef VertexProgramChunkPtr osg::VertexProgramChunkBase::Ptr [inherited] |
Reimplemented from osg::ProgramChunkBase.
Reimplemented in osg::FatBorderChunkBase.
Definition at line 89 of file OSGVertexProgramChunkBase.h.
anonymous enum [inherited] |
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 };
anonymous enum [inherited] |
Definition at line 92 of file OSGStateChunkBase.h.
00093 { 00094 IgnoreFieldId = Inherited::NextFieldId, 00095 NextFieldId = IgnoreFieldId + 1 00096 };
anonymous enum [inherited] |
Definition at line 86 of file OSGAttachmentImpl.h.
00087 { 00088 ParentsFieldId = Inherited::NextFieldId, 00089 InternalFieldId = ParentsFieldId + 1, 00090 NextFieldId = InternalFieldId + 1 00091 };
anonymous enum [inherited] |
| VertexProgramChunk::VertexProgramChunk | ( | void | ) | [protected] |
Definition at line 94 of file OSGVertexProgramChunk.cpp.
References _arbVertexProgram, and osg::Window::registerExtension().
00094 : 00095 Inherited() 00096 { 00097 _arbVertexProgram = Window::registerExtension("GL_ARB_vertex_program"); 00098 }
| VertexProgramChunk::VertexProgramChunk | ( | const VertexProgramChunk & | source | ) | [protected] |
Definition at line 100 of file OSGVertexProgramChunk.cpp.
00100 : 00101 Inherited(source) 00102 { 00103 }
| VertexProgramChunk::~VertexProgramChunk | ( | void | ) | [protected, virtual] |
| const StateChunkClass * VertexProgramChunk::getClass | ( | void | ) | const [virtual] |
Reimplemented from osg::ProgramChunk.
Definition at line 138 of file OSGVertexProgramChunk.cpp.
References _class.
00139 { 00140 return &_class; 00141 }
| UInt32 osg::VertexProgramChunk::getStaticClassId | ( | void | ) | [inline, static] |
Reimplemented from osg::ProgramChunk.
Definition at line 46 of file OSGVertexProgramChunk.inl.
References osg::StateChunkClass::getId(), and getStaticClass().
00047 { 00048 return getStaticClass()->getId(); 00049 }
| const StateChunkClass * osg::VertexProgramChunk::getStaticClass | ( | void | ) | [inline, static] |
Reimplemented from osg::ProgramChunk.
Definition at line 52 of file OSGVertexProgramChunk.inl.
References _class.
Referenced by getStaticClassId().
00053 { 00054 return &VertexProgramChunk::_class; 00055 }
Reimplemented from osg::ProgramChunk.
Reimplemented in osg::FatBorderChunk.
Definition at line 145 of file OSGVertexProgramChunk.cpp.
References osg::ProgramChunk::changed().
Referenced by osg::FatBorderChunk::changed().
00146 { 00147 Inherited::changed(whichField, origin); 00148 }
Reimplemented from osg::ProgramChunk.
Reimplemented in osg::FatBorderChunk.
Definition at line 150 of file OSGVertexProgramChunk.cpp.
References SLOG.
00152 { 00153 SLOG << "Dump VertexProgramChunk NI" << std::endl; 00154 }
| void VertexProgramChunk::onCreate | ( | const VertexProgramChunk * | source = NULL |
) | [protected] |
Definition at line 111 of file OSGVertexProgramChunk.cpp.
References osg::beginEditCP(), osg::endEditCP(), osg::ProgramChunkBase::GLIdFieldMask, osg::GlobalSystemState, handleGL(), osg::osgTypedMethodVoidFunctor2ObjCPtrPtr(), osg::Window::registerGLObject(), osg::ProgramChunkBase::setGLId(), and osg::Startup.
Referenced by osg::FatBorderChunk::onCreate().
00112 { 00113 if(GlobalSystemState == Startup) 00114 return; 00115 00116 // !!! this temporary is needed to work around compiler problems (sgi) 00117 // CHECK CHECK 00118 // VertexProgramChunkPtr tmpPtr = FieldContainer::getPtr<ProgramChunkPtr>(*this); 00119 VertexProgramChunkPtr tmpPtr(*this); 00120 00121 beginEditCP(tmpPtr, VertexProgramChunk::GLIdFieldMask); 00122 00123 setGLId( 00124 Window::registerGLObject( 00125 osgTypedMethodVoidFunctor2ObjCPtrPtr<VertexProgramChunkPtr, 00126 Window , 00127 UInt32>( 00128 tmpPtr, 00129 &VertexProgramChunk::handleGL), 00130 1)); 00131 00132 endEditCP(tmpPtr, VertexProgramChunk::GLIdFieldMask); 00133 }
| UInt32 VertexProgramChunk::getExtension | ( | void | ) | const [protected, virtual] |
Reimplemented from osg::ProgramChunk.
Definition at line 166 of file OSGVertexProgramChunk.cpp.
References _arbVertexProgram.
00167 { 00168 return _arbVertexProgram; 00169 }
| GLenum VertexProgramChunk::getTarget | ( | void | ) | const [protected, virtual] |
Reimplemented from osg::ProgramChunk.
Definition at line 171 of file OSGVertexProgramChunk.cpp.
References GL_VERTEX_PROGRAM_ARB.
00172 { 00173 return GL_VERTEX_PROGRAM_ARB; 00174 }
| const char * VertexProgramChunk::getTargetName | ( | void | ) | const [protected, virtual] |
| void VertexProgramChunk::initMethod | ( | void | ) | [static, private] |
Reimplemented from osg::ProgramChunk.
Reimplemented in osg::FatBorderChunk.
Definition at line 79 of file OSGVertexProgramChunk.cpp.
GL object handler create the program and destroy it
Definition at line 161 of file OSGVertexProgramChunk.cpp.
References _arbVertexProgram, GL_VERTEX_PROGRAM_ARB, and osg::ProgramChunk::handleGL().
Referenced by onCreate().
00162 { 00163 Inherited::handleGL(win, idstatus, GL_VERTEX_PROGRAM_ARB, _arbVertexProgram); 00164 }
| void osg::VertexProgramChunk::operator= | ( | const VertexProgramChunk & | source | ) | [private] |
| osg::FieldContainerType & osg::VertexProgramChunkBase::getClassType | ( | void | ) | [inline, static, inherited] |
Reimplemented from osg::ProgramChunkBase.
Reimplemented in osg::FatBorderChunkBase.
Definition at line 58 of file OSGVertexProgramChunkBase.inl.
References osg::VertexProgramChunkBase::_type.
Referenced by osg::VertexProgramChunkBase::create(), and osg::RemoteAspect::RemoteAspect().
00059 { 00060 return _type; 00061 }
| osg::UInt32 osg::VertexProgramChunkBase::getClassTypeId | ( | void | ) | [inline, static, inherited] |
Reimplemented from osg::ProgramChunkBase.
Reimplemented in osg::FatBorderChunkBase.
Definition at line 65 of file OSGVertexProgramChunkBase.inl.
References osg::VertexProgramChunkBase::_type, and osg::TypeBase::getId().
00066 { 00067 return _type.getId(); 00068 }
| FieldContainerType & VertexProgramChunkBase::getType | ( | void | ) | [virtual, inherited] |
Reimplemented from osg::ProgramChunkBase.
Reimplemented in osg::FatBorderChunkBase.
Definition at line 86 of file OSGVertexProgramChunkBase.cpp.
References osg::VertexProgramChunkBase::_type.
00087 { 00088 return _type; 00089 }
| const FieldContainerType & VertexProgramChunkBase::getType | ( | void | ) | const [virtual, inherited] |
Reimplemented from osg::ProgramChunkBase.
Reimplemented in osg::FatBorderChunkBase.
Definition at line 91 of file OSGVertexProgramChunkBase.cpp.
References osg::VertexProgramChunkBase::_type.
00092 { 00093 return _type; 00094 }
| UInt32 VertexProgramChunkBase::getContainerSize | ( | void | ) | const [virtual, inherited] |
Reimplemented from osg::ProgramChunkBase.
Reimplemented in osg::FatBorderChunkBase.
Definition at line 106 of file OSGVertexProgramChunkBase.cpp.
00107 { 00108 return sizeof(VertexProgramChunk); 00109 }
Reimplemented from osg::ProgramChunkBase.
Reimplemented in osg::FatBorderChunkBase.
Definition at line 166 of file OSGVertexProgramChunkBase.cpp.
References osg::ProgramChunkBase::getBinSize().
Referenced by osg::FatBorderChunkBase::getBinSize().
00167 { 00168 UInt32 returnValue = Inherited::getBinSize(whichField); 00169 00170 00171 return returnValue; 00172 }
| void VertexProgramChunkBase::copyToBin | ( | BinaryDataHandler & | pMem, | |
| const BitVector & | whichField | |||
| ) | [virtual, inherited] |
Reimplemented from osg::ProgramChunkBase.
Reimplemented in osg::FatBorderChunkBase.
Definition at line 174 of file OSGVertexProgramChunkBase.cpp.
References osg::ProgramChunkBase::copyToBin().
Referenced by osg::FatBorderChunkBase::copyToBin().
00176 { 00177 Inherited::copyToBin(pMem, whichField); 00178 00179 00180 }
| void VertexProgramChunkBase::copyFromBin | ( | BinaryDataHandler & | pMem, | |
| const BitVector & | whichField | |||
| ) | [virtual, inherited] |
Reimplemented from osg::ProgramChunkBase.
Reimplemented in osg::FatBorderChunkBase.
Definition at line 182 of file OSGVertexProgramChunkBase.cpp.
References osg::ProgramChunkBase::copyFromBin().
Referenced by osg::FatBorderChunkBase::copyFromBin().
00184 { 00185 Inherited::copyFromBin(pMem, whichField); 00186 00187 00188 }
| VertexProgramChunkPtr osg::VertexProgramChunkBase::create | ( | void | ) | [inline, static, inherited] |
Reimplemented from osg::Attachment.
Reimplemented in osg::FatBorderChunkBase.
Definition at line 72 of file OSGVertexProgramChunkBase.inl.
References osg::AttachmentPtr::dcast(), osg::VertexProgramChunkBase::getClassType(), osg::NullFC, and osg::VertexProgramChunkBase::shallowCopy().
Referenced by osg::PhongMaterial::createChunkMaterial(), and osg::PhongMaterial::prepareLocalChunks().
00073 { 00074 VertexProgramChunkPtr fc; 00075 00076 if(getClassType().getPrototype() != OSG::NullFC) 00077 { 00078 fc = VertexProgramChunkPtr::dcast( 00079 getClassType().getPrototype()-> shallowCopy()); 00080 } 00081 00082 return fc; 00083 }
| VertexProgramChunkPtr osg::VertexProgramChunkBase::createEmpty | ( | void | ) | [inline, static, inherited] |
Reimplemented from osg::Attachment.
Reimplemented in osg::FatBorderChunkBase.
Definition at line 87 of file OSGVertexProgramChunkBase.inl.
References osg::FieldContainer::newPtr().
00088 { 00089 VertexProgramChunkPtr returnValue; 00090 00091 newPtr(returnValue); 00092 00093 return returnValue; 00094 }
| FieldContainerPtr VertexProgramChunkBase::shallowCopy | ( | void | ) | const [virtual, inherited] |
Reimplemented from osg::Attachment.
Reimplemented in osg::FatBorderChunkBase.
Definition at line 97 of file OSGVertexProgramChunkBase.cpp.
References osg::FieldContainer::newPtr().
Referenced by osg::VertexProgramChunkBase::create().
00098 { 00099 VertexProgramChunkPtr returnValue; 00100 00101 newPtr(returnValue, dynamic_cast<const VertexProgramChunk *>(this)); 00102 00103 return returnValue; 00104 }
| void VertexProgramChunkBase::executeSyncImpl | ( | VertexProgramChunkBase * | pOther, | |
| const BitVector & | whichField | |||
| ) | [protected, inherited] |
Definition at line 191 of file OSGVertexProgramChunkBase.cpp.
References osg::ProgramChunkBase::executeSyncImpl().
Referenced by osg::VertexProgramChunkBase::executeSync(), and osg::FatBorderChunkBase::executeSyncImpl().
00193 { 00194 00195 Inherited::executeSyncImpl(pOther, whichField); 00196 00197 00198 }
| void ProgramChunkBase::executeSyncImpl | ( | ProgramChunkBase * | pOther, | |
| const BitVector & | whichField | |||
| ) | [protected, inherited] |
Definition at line 305 of file OSGProgramChunkBase.cpp.
References osg::ProgramChunkBase::_mfParamNames, osg::ProgramChunkBase::_mfParamValues, osg::ProgramChunkBase::_sfGLId, osg::ProgramChunkBase::_sfProgram, osg::StateChunkBase::executeSyncImpl(), osg::ProgramChunkBase::GLIdFieldMask, osg::FieldBits::NoField, osg::ProgramChunkBase::ParamNamesFieldMask, osg::ProgramChunkBase::ParamValuesFieldMask, osg::ProgramChunkBase::ProgramFieldMask, osg::MField< FieldTypeT, fieldNameSpace >::syncWith(), and osg::SField< FieldTypeT, fieldNameSpace >::syncWith().
Referenced by osg::ProgramChunkBase::executeSync(), osg::VertexProgramChunkBase::executeSyncImpl(), and osg::FragmentProgramChunkBase::executeSyncImpl().
00307 { 00308 00309 Inherited::executeSyncImpl(pOther, whichField); 00310 00311 if(FieldBits::NoField != (ProgramFieldMask & whichField)) 00312 _sfProgram.syncWith(pOther->_sfProgram); 00313 00314 if(FieldBits::NoField != (ParamValuesFieldMask & whichField)) 00315 _mfParamValues.syncWith(pOther->_mfParamValues); 00316 00317 if(FieldBits::NoField != (ParamNamesFieldMask & whichField)) 00318 _mfParamNames.syncWith(pOther->_mfParamNames); 00319 00320 if(FieldBits::NoField != (GLIdFieldMask & whichField)) 00321 _sfGLId.syncWith(pOther->_sfGLId); 00322 00323 00324 }
| void osg::StateChunkBase::executeSyncImpl | ( | StateChunkBase * | pOther, | |
| const BitVector & | whichField | |||
| ) | [protected, inherited] |
Definition at line 219 of file OSGStateChunkBase.cpp.
References osg::StateChunkBase::_sfIgnore, osg::Attachment::executeSyncImpl(), osg::StateChunkBase::IgnoreFieldMask, osg::FieldBits::NoField, and osg::SField< FieldTypeT, fieldNameSpace >::syncWith().
Referenced by osg::StateChunkBase::executeSync(), osg::TwoSidedLightingChunkBase::executeSyncImpl(), osg::TransformChunkBase::executeSyncImpl(), osg::TextureChunkBase::executeSyncImpl(), osg::TexGenChunkBase::executeSyncImpl(), osg::StencilChunkBase::executeSyncImpl(), osg::ShaderParameterChunkBase::executeSyncImpl(), osg::SClipPlaneChunkBase::executeSyncImpl(), osg::RegisterCombinersChunkBase::executeSyncImpl(), osg::ProgramChunkBase::executeSyncImpl(), osg::PolygonChunkBase::executeSyncImpl(), osg::PointChunkBase::executeSyncImpl(), osg::MaterialChunkBase::executeSyncImpl(), osg::LogicOpChunkBase::executeSyncImpl(), osg::LineChunkBase::executeSyncImpl(), osg::LightModelChunkBase::executeSyncImpl(), osg::LightChunkBase::executeSyncImpl(), osg::DepthChunkBase::executeSyncImpl(), osg::ColorMaskChunkBase::executeSyncImpl(), osg::ClipPlaneChunkBase::executeSyncImpl(), and osg::BlendChunkBase::executeSyncImpl().
00221 { 00222 00223 Inherited::executeSyncImpl(pOther, whichField); 00224 00225 if(FieldBits::NoField != (IgnoreFieldMask & whichField)) 00226 _sfIgnore.syncWith(pOther->_sfIgnore); 00227 00228 00229 }
| void Attachment::executeSyncImpl | ( | Attachment * | pOther, | |
| const BitVector & | whichField | |||
| ) | [protected, inherited] |
Definition at line 306 of file OSGAttachment.cpp.
References osg::Attachment::_parents, osg::Attachment::_sfInternal, osg::FieldContainer::executeSyncImpl(), osg::Attachment::InternalFieldMask, osg::FieldBits::NoField, osg::Attachment::ParentsFieldMask, osg::MField< FieldTypeT, fieldNameSpace >::syncWith(), and osg::SField< FieldTypeT, fieldNameSpace >::syncWith().
Referenced by osg::Attachment::executeSync(), osg::StringAttributeMapBase::executeSyncImpl(), osg::StateChunkBase::executeSyncImpl(), osg::RenderOptionsBase::executeSyncImpl(), osg::FCPtrAttributeMapBase::executeSyncImpl(), osg::DVRVolumeTextureBase::executeSyncImpl(), osg::DVRLookupTableBase::executeSyncImpl(), osg::DVRIsoSurfaceBase::executeSyncImpl(), osg::DVRClipObjectsBase::executeSyncImpl(), and osg::SimpleAttachment< AttachmentDescT >::executeSyncImpl().
00308 { 00309 Inherited::executeSyncImpl(pOther, whichField); 00310 00311 if(FieldBits::NoField != (InternalFieldMask & whichField)) 00312 { 00313 _sfInternal.syncWith(pOther->_sfInternal); 00314 } 00315 00316 if(FieldBits::NoField != (ParentsFieldMask & whichField)) 00317 { 00318 _parents.syncWith(pOther->_parents); 00319 } 00320 }
| void osg::FieldContainer::executeSyncImpl | ( | FieldContainer * | pOther, | |
| const BitVector & | whichField | |||
| ) | [inline, protected, inherited] |
Definition at line 333 of file OSGFieldContainerImpl.inl.
Referenced by osg::StateBase::executeSyncImpl(), osg::DVRShaderBase::executeSyncImpl(), osg::DVRClipGeometryBase::executeSyncImpl(), osg::AttachmentContainer::executeSyncImpl(), and osg::Attachment::executeSyncImpl().
| void VertexProgramChunkBase::executeSync | ( | FieldContainer & | other, | |
| const BitVector & | whichField | |||
| ) | [protected, virtual, inherited] |
Reimplemented from osg::ProgramChunkBase.
Reimplemented in osg::FatBorderChunkBase.
Definition at line 113 of file OSGVertexProgramChunkBase.cpp.
References osg::VertexProgramChunkBase::executeSyncImpl().
00115 { 00116 this->executeSyncImpl((VertexProgramChunkBase *) &other, whichField); 00117 }
| bool ProgramChunk::read | ( | const char * | file | ) | [inherited] |
Read the program string from the given file
Definition at line 187 of file OSGProgramChunk.cpp.
References FWARNING.
00188 { 00189 std::ifstream s(file); 00190 00191 if(s.good()) 00192 { 00193 return read(s); 00194 } 00195 else 00196 { 00197 FWARNING(("ProgramChunk::read: couldn't open '%s' for reading!\n", 00198 file)); 00199 return false; 00200 } 00201 }
| bool ProgramChunk::read | ( | std::istream & | stream | ) | [inherited] |
Read the program string from the given stream
Definition at line 205 of file OSGProgramChunk.cpp.
References BUFSIZE, FWARNING, and osg::ProgramChunkBase::getProgram().
00206 { 00207 #define BUFSIZE 200 00208 00209 getProgram().erase(); 00210 char buf[BUFSIZE]; 00211 00212 if(!stream.good()) 00213 { 00214 FWARNING(("ProgramChunk::read: stream is not good!\n")); 00215 return false; 00216 00217 } 00218 00219 do 00220 { 00221 stream.read(buf, BUFSIZE); 00222 getProgram().append(buf, stream.gcount()); 00223 } 00224 while(!stream.eof()); 00225 00226 return true; 00227 }
| bool ProgramChunk::addParameter | ( | const char * | name, | |
| Int16 | index | |||
| ) | [inherited] |
Add a named parameter
Definition at line 231 of file OSGProgramChunk.cpp.
References osg::ProgramChunkBase::getParamNames(), and osg::MField< FieldTypeT, fieldNameSpace >::resize().
Referenced by osg::ProgramChunk::addParameter().
00233 { 00234 if(index < 0) 00235 return true; 00236 00237 if(getParamNames().size() <= UInt16(index)) 00238 { 00239 getParamNames().resize(index + 1); 00240 } 00241 getParamNames()[index] = name; 00242 return false; 00243 }
| bool osg::ProgramChunk::addParameter | ( | const char * | name, | |
| Int16 | index, | |||
| const Vec4f & | value | |||
| ) | [inline, inherited] |
Concvenience function to add a new parameter and directly set its value.
Definition at line 63 of file OSGProgramChunk.inl.
References osg::ProgramChunk::addParameter(), and osg::ProgramChunk::setParameter().
00066 { 00067 addParameter(name, index); 00068 return setParameter(index, value); 00069 }
Read the program string from the given file
Definition at line 245 of file OSGProgramChunk.cpp.
References osg::ProgramChunkBase::getParamValues().
Referenced by osg::ProgramChunk::getParameter().
00246 { 00247 static const Vec4f bad(-1e10,-1e10,-1e10); 00248 00249 if(index < 0) 00250 return bad; 00251 00252 if(getParamValues().size() <= UInt16(index)) 00253 { 00254 return getParamValues()[index]; 00255 } 00256 00257 return bad; 00258 }
| const Vec4f & osg::ProgramChunk::getParameter | ( | const char * | name | ) | [inline, inherited] |
Read the program string from the given file
Definition at line 72 of file OSGProgramChunk.inl.
References osg::ProgramChunk::findParameter(), and osg::ProgramChunk::getParameter().
00073 { 00074 return getParameter(findParameter(name)); 00075 }
| const Vec4f & osg::ProgramChunk::getParameter | ( | const std::string & | name | ) | [inline, inherited] |
Read the program string from the given file
Definition at line 78 of file OSGProgramChunk.inl.
References osg::ProgramChunk::findParameter(), and osg::ProgramChunk::getParameter().
00079 { 00080 return getParameter(findParameter(name.c_str())); 00081 }
Set parameter value, create it if not set yet.
Definition at line 262 of file OSGProgramChunk.cpp.
References osg::ProgramChunkBase::getParamValues(), and osg::MField< FieldTypeT, fieldNameSpace >::resize().
Referenced by osg::ProgramChunk::addParameter(), and osg::ProgramChunk::setParameter().
00263 { 00264 if(index < 0) 00265 return true; 00266 00267 if(getParamValues().size() <= UInt16(index)) 00268 { 00269 getParamValues().resize(index + 1); 00270 } 00271 getParamValues()[index] = value; 00272 return false; 00273 }
| bool osg::ProgramChunk::setParameter | ( | const char * | name, | |
| const Vec4f & | value | |||
| ) | [inline, inherited] |
Read the program string from the given file
Definition at line 84 of file OSGProgramChunk.inl.
References osg::ProgramChunk::findParameter(), and osg::ProgramChunk::setParameter().
00085 { 00086 return setParameter(findParameter(name), value); 00087 }
| bool osg::ProgramChunk::setParameter | ( | const std::string & | name, | |
| const Vec4f & | value | |||
| ) | [inline, inherited] |
Read the program string from the given file
Definition at line 90 of file OSGProgramChunk.inl.
References osg::ProgramChunk::findParameter(), and osg::ProgramChunk::setParameter().
00091 { 00092 return setParameter(findParameter(name.c_str()), value); 00093 }
| Int16 osg::ProgramChunk::findParameter | ( | const char * | name | ) | [inline, inherited] |
Read the program string from the given file
Definition at line 96 of file OSGProgramChunk.inl.
Referenced by osg::ProgramChunk::getParameter(), and osg::ProgramChunk::setParameter().
00097 { 00098 return findParameter(std::string(name)); 00099 }
| Int16 ProgramChunk::findParameter | ( | const std::string & | name | ) | [inherited] |
Find the index for a named parameter, return -1 if not found.
Definition at line 277 of file OSGProgramChunk.cpp.
References osg::MField< FieldTypeT, fieldNameSpace >::begin(), and osg::ProgramChunkBase::getParamNames().
00278 { 00279 MField<std::string>::iterator it; 00280 00281 it = std::find(getParamNames().begin(), getParamNames().end(), name); 00282 00283 if(it == getParamNames().end()) 00284 return -1; 00285 00286 return it - getParamNames().begin(); 00287 }
| void ProgramChunk::activate | ( | DrawActionBase * | action, | |
| UInt32 | index = 0 | |||
| ) | [virtual, inherited] |
Reimplemented from osg::StateChunk.
Definition at line 467 of file OSGProgramChunk.cpp.
References osg::ProgramChunk::_funcBindProgram, osg::ProgramChunk::getExtension(), osg::Window::getFunction(), osg::ProgramChunkBase::getGLId(), osg::Window::getGLObjectId(), osg::ProgramChunkBase::getProgram(), osg::ProgramChunk::getTarget(), osg::DrawActionBase::getWindow(), GLenum, glErr, GLuint(), osg::Window::hasExtension(), OSG_APIENTRY, and osg::Window::validateGLObject().
00468 { 00469 // get the program-type specifics from the derived chunks 00470 GLenum target = getTarget(); 00471 UInt32 extension = getExtension(); 00472 00473 if(!action->getWindow()->hasExtension(extension)) 00474 { 00475 return; 00476 } 00477 00478 if(getProgram().empty()) 00479 return; 00480 00481 action->getWindow()->validateGLObject(getGLId()); 00482 00483 // get "glBindProgramARB" function pointer 00484 void (OSG_APIENTRY* bindProgram)(GLenum target, GLuint prog) = 00485 (void (OSG_APIENTRY*)(GLenum target, GLuint prog)) 00486 action->getWindow()->getFunction(_funcBindProgram); 00487 00488 glErr("ProgramChunk::activate: bindProgram precheck"); 00489 00490 glEnable(target); 00491 00492 glErr("ProgramChunk::activate: enable postcheck"); 00493 00494 bindProgram(target, action->getWindow()->getGLObjectId(getGLId())); 00495 00496 glErr("ProgramChunk::activate: bindProgram postcheck"); 00497 }
| void ProgramChunk::changeFrom | ( | DrawActionBase * | action, | |
| StateChunk * | old, | |||
| UInt32 | index = 0 | |||
| ) | [virtual, inherited] |
Reimplemented from osg::StateChunk.
Definition at line 499 of file OSGProgramChunk.cpp.
References osg::ProgramChunk::_funcBindProgram, FWARNING, osg::ProgramChunk::getExtension(), osg::Window::getFunction(), osg::ProgramChunkBase::getGLId(), osg::Window::getGLObjectId(), osg::ProgramChunkBase::getProgram(), osg::ProgramChunk::getTarget(), osg::DrawActionBase::getWindow(), GLenum, glErr, GLuint(), osg::Window::hasExtension(), OSG_APIENTRY, and osg::Window::validateGLObject().
00502 { 00503 ProgramChunk * old = dynamic_cast<ProgramChunk*>(old_chunk); 00504 00505 if(old == NULL) 00506 { 00507 FWARNING(( "ProgramChunk::changeFrom: caught non-ProgramChunk!\n")); 00508 return; 00509 } 00510 00511 // get the program-type specifics from the derived chunks 00512 GLenum target = getTarget(); 00513 UInt32 extension = getExtension(); 00514 00515 if(!action->getWindow()->hasExtension(extension)) 00516 return; 00517 00518 if(getProgram().empty()) 00519 { 00520 if(old->getProgram().empty()) 00521 return; 00522 00523 glDisable(target); 00524 } 00525 00526 action->getWindow()->validateGLObject(getGLId()); 00527 00528 // get "glBindProgramARB" function pointer 00529 void (OSG_APIENTRY* bindProgram)(GLenum target, GLuint prog) = 00530 (void (OSG_APIENTRY*)(GLenum target, GLuint prog)) 00531 action->getWindow()->getFunction(_funcBindProgram); 00532 00533 glErr("ProgramChunk::changeFrom: bindProgram precheck"); 00534 00535 if(old->getProgram().empty()) 00536 glEnable(target); 00537 00538 glErr("ProgramChunk::changeFrom: enable postcheck"); 00539 00540 bindProgram(target, action->getWindow()->getGLObjectId(getGLId())); 00541 00542 glErr("ProgramChunk::changeFrom: bindProgram postcheck"); 00543 }
| void ProgramChunk::deactivate | ( | DrawActionBase * | action, | |
| UInt32 | index = 0 | |||
| ) | [virtual, inherited] |
Reimplemented from osg::StateChunk.
Definition at line 545 of file OSGProgramChunk.cpp.
References osg::ProgramChunk::_funcBindProgram, osg::ProgramChunk::getExtension(), osg::Window::getFunction(), osg::ProgramChunkBase::getGLId(), osg::Window::getGLObjectId(), osg::ProgramChunkBase::getProgram(), osg::ProgramChunk::getTarget(), osg::DrawActionBase::getWindow(), GLenum, glErr, GLuint(), osg::Window::hasExtension(), and OSG_APIENTRY.
00546 { 00547 // get the program-type specifics from the derived chunks 00548 GLenum target = getTarget(); 00549 UInt32 extension = getExtension(); 00550 00551 if(!action->getWindow()->hasExtension(extension)) 00552 { 00553 return; 00554 } 00555 00556 if(getProgram().empty()) 00557 { 00558 return; 00559 } 00560 00561 // get "glBindProgramARB" function pointer 00562 void (OSG_APIENTRY* bindProgram)(GLenum target, GLuint prog) = 00563 (void (OSG_APIENTRY*)(GLenum target, GLuint prog)) 00564 action->getWindow()->getFunction(_funcBindProgram); 00565 00566 00567 glErr("ProgramChunk::deactivate: bindProgram precheck"); 00568 00569 bindProgram(target, action->getWindow()->getGLObjectId(getGLId())); 00570 00571 glErr("ProgramChunk::deactivate: bindProgram postcheck"); 00572 00573 glDisable(target); 00574 00575 glErr("ProgramChunk::deactivate: disable postcheck"); 00576 }
| bool ProgramChunk::isTransparent | ( | void | ) | const [virtual, inherited] |
| Real32 ProgramChunk::switchCost | ( | StateChunk * | chunk | ) | [virtual, inherited] |
| bool ProgramChunk::operator< | ( | const StateChunk & | other | ) | const [virtual, inherited] |
| bool ProgramChunk::operator== | ( | const StateChunk & | other | ) | const [virtual, inherited] |
Reimplemented from osg::StateChunk.
Definition at line 623 of file OSGProgramChunk.cpp.
References osg::ProgramChunkBase::getParamNames(), osg::ProgramChunkBase::getParamValues(), osg::ProgramChunkBase::getProgram(), and osg::MField< FieldTypeT, fieldNameSpace >::size().
00624 { 00625 ProgramChunk const *tother = dynamic_cast<ProgramChunk const*>(&other); 00626 00627 if(!tother) 00628 return false; 00629 00630 if(tother == this) 00631 return true; 00632 00633 if(getProgram() != tother->getProgram() || 00634 getParamValues().size() != tother->getParamValues().size() || 00635 getParamNames().size() != tother->getParamNames().size() 00636 ) 00637 return false; 00638 00639 // !!! FIXME: implement 00640 00641 return false; 00642 }
| bool ProgramChunk::operator!= | ( | const StateChunk & | other | ) | const [virtual, inherited] |
| void ProgramChunk::onCreate | ( | const ProgramChunk * | source = NULL |
) | [protected, inherited] |
| void osg::FieldContainer::onCreate | ( | const FieldContainer * | source = NULL |
) | [inline, protected, inherited] |
Definition at line 318 of file OSGFieldContainerImpl.inl.
Referenced by osg::ShaderParameterChunk::onCreate().
Print the error message if compilation fails
Definition at line 294 of file OSGProgramChunk.cpp.
References osg::endLog(), FWARNING, osg::ProgramChunkBase::getProgram(), GL_PROGRAM_ERROR_POSITION_ARB, GL_PROGRAM_ERROR_STRING_ARB, start, SWARNING, and osg::Window::unpackIdStatus().
Referenced by osg::ProgramChunk::handleGL().
00295 { 00296 Window::GLObjectStatusE mode; 00297 UInt32 id; 00298 00299 Window::unpackIdStatus(idstatus, id, mode); 00300 00301 GLint pos; 00302 glGetIntegerv(GL_PROGRAM_ERROR_POSITION_ARB, &pos); 00303 00304 FWARNING(("ProgramChunk(%p:%d,%d): error compiling program " 00305 "at position %d: %s\n", 00306 win, id, mode, pos, glGetString(GL_PROGRAM_ERROR_STRING_ARB))); 00307 00308 UInt32 start = 0, end, line = 0; 00309 00310 for(end = 0; end < getProgram().size(); ++end) 00311 { 00312 if(getProgram()[end] == '\n') 00313 { 00314 ++line; 00315 00316 if(UInt32(pos) < end) 00317 break; 00318 00319 start = end + 1; 00320 } 00321 } 00322 00323 std::string mesg; 00324 00325 for(UInt32 i = start; i < end; ++i) 00326 { 00327 if(i == pos) 00328 { 00329 mesg += '>'; 00330 mesg += '>'; 00331 } 00332 00333 mesg += getProgram()[i]; 00334 00335 if(i == pos) 00336 { 00337 mesg += '<'; 00338 mesg += '<'; 00339 } 00340 } 00341 00342 SWARNING << "Location (line " << line << "): " << mesg << endLog; 00343 }
| void ProgramChunk::handleGL | ( | Window * | win, | |
| UInt32 | idstatus, | |||
| GLenum | target, | |||
| UInt32 | extension | |||
| ) | [protected, inherited] |
GL object handler create the program and destroy it
Definition at line 348 of file OSGProgramChunk.cpp.
References osg::ProgramChunk::_funcBindProgram, osg::ProgramChunk::_funcDeletePrograms, osg::ProgramChunk::_funcGenPrograms, osg::ProgramChunk::_funcProgramLocalParameter4fv, osg::ProgramChunk::_funcProgramString, osg::Window::destroy, osg::endLog(), osg::Window::finaldestroy, osg::Window::getFunction(), osg::Window::getGLObjectId(), osg::ProgramChunkBase::getParamValues(), osg::ProgramChunkBase::getProgram(), osg::PointInterface< ValueTypeT, StorageInterfaceT >::getValues(), GL_PROGRAM_FORMAT_ASCII_ARB, GLenum, glErr, GLsizei, GLuint(), osg::Window::hasExtension(), osg::Window::initialize, osg::Window::needrefresh, OSG_APIENTRY, osg::ProgramChunk::printCompileError(), osg::Window::reinitialize, osg::Window::setGLObjectId(), osg::MField< FieldTypeT, fieldNameSpace >::size(), SWARNING, and osg::Window::unpackIdStatus().
Referenced by handleGL(), and osg::FragmentProgramChunk::handleGL().
00349 { 00350 Window::GLObjectStatusE mode; 00351 UInt32 osgid; 00352 GLuint id; 00353 00354 Window::unpackIdStatus(idstatus, osgid, mode); 00355 00356 // get the program-specific specifics from the derived chunks 00357 // We can't call this member methods on Window::destroy because 00358 // the ProgramChunk instance is already destroyed. 00359 //GLenum target = getTarget(); 00360 //UInt32 extension = getExtension(); 00361 00362 if(!win->hasExtension(extension)) 00363 return; 00364 00365 id = win->getGLObjectId(osgid); 00366 00367 if(mode == Window::destroy) 00368 { 00369 // get "glDeleteProgramsARB" function pointer 00370 void (OSG_APIENTRY* deletePrograms)(GLsizei num, const GLuint *progs) = 00371 (void (OSG_APIENTRY*)(GLsizei num, const GLuint *progs)) 00372 win->getFunction(_funcDeletePrograms); 00373 00374 deletePrograms(1, &id); 00375 win->setGLObjectId(osgid, 0); 00376 } 00377 else if(mode == Window::finaldestroy) 00378 { 00379 //SWARNING << "Last program user destroyed" << std::endl; 00380 } 00381 else if(mode == Window::initialize || mode == Window::reinitialize || 00382 mode == Window::needrefresh) 00383 { 00384 if(mode == Window::initialize) 00385 { 00386 // get "glGenProgramsARB" function pointer 00387 void (OSG_APIENTRY* genPrograms)(GLsizei n, GLuint *prog) = 00388 (void (OSG_APIENTRY*)(GLsizei n, GLuint *prog)) 00389 win->getFunction(_funcGenPrograms); 00390 genPrograms(1, &id); 00391 win->setGLObjectId(osgid, id); 00392 } 00393 00394 // get "glBindProgramARB" function pointer 00395 void (OSG_APIENTRY* bindProgram)(GLenum target, GLuint prog) = 00396 (void (OSG_APIENTRY*)(GLenum target, GLuint prog)) 00397 win->getFunction(_funcBindProgram); 00398 00399 glErr("ProgramChunk::handleGL: bindProgram precheck"); 00400 00401 bindProgram(target, id); 00402 00403 glErr("ProgramChunk::handleGL: bindProgram postcheck"); 00404 00405 if(mode != Window::needrefresh) 00406 { 00407 // get "glProgramStringARB" function pointer 00408 void (OSG_APIENTRY* programString)(GLenum target, GLenum format, 00409 GLsizei lesn, const void *string) = 00410 (void (OSG_APIENTRY*)(GLenum target, GLenum format, 00411 GLsizei len, const void *string)) 00412 win->getFunction(_funcProgramString); 00413 00414 glErr("ProgramChunk::handleGL: programString precheck"); 00415 00416 glEnable(target); 00417 00418 glErr("ProgramChunk::handleGL: enable postcheck"); 00419 00420 programString(target, GL_PROGRAM_FORMAT_ASCII_ARB, 00421 getProgram().size(), getProgram().c_str()); 00422 00423 GLenum err = glGetError(); 00424 00425 if(err == GL_INVALID_OPERATION) 00426 { 00427 printCompileError(win, idstatus); 00428 } 00429 else if (err != GL_NO_ERROR) 00430 { 00431 SWARNING << "ProgramChunk::programString postcheck failed:" 00432 << gluErrorString(err) << endLog; 00433 } 00434 00435 glDisable(target); 00436 00437 glErr("ProgramChunk::handleGL: disable postcheck"); 00438 } 00439 00440 void (OSG_APIENTRY* programLocalParameter4fv)(GLenum target, 00441 GLuint index, const GLfloat *params) = 00442 (void (OSG_APIENTRY*)(GLenum target, 00443 GLuint index, const GLfloat *params)) 00444 win->getFunction(_funcProgramLocalParameter4fv); 00445 00446 glErr("ProgramChunk::handleGL: programLocalParameter precheck"); 00447 00448 for(UInt16 i = 0; i < getParamValues().size(); ++i) 00449 { 00450 Vec4f &val=getParamValues()[i]; 00451 00452 programLocalParameter4fv(target, i, val.getValues()); 00453 00454 glErr("ProgramChunk::handleGL: programLocalParameter"); 00455 } 00456 00457 glErr("ProgramChunk::handleGL: programLocalParameter postcheck"); 00458 } 00459 else 00460 { 00461 SWARNING << "ProgramChunk(" << this << "::handleGL: Illegal mode: " 00462 << mode << " for id " << id << std::endl; 00463 } 00464 00465 }
| SFString * osg::ProgramChunkBase::getSFProgram | ( | void | ) | [inline, inherited] |
Definition at line 75 of file OSGProgramChunkBase.inl.
References osg::ProgramChunkBase::_sfProgram.
00076 { 00077 return &_sfProgram; 00078 }
| MFVec4f * osg::ProgramChunkBase::getMFParamValues | ( | void | ) | [inline, inherited] |
Definition at line 82 of file OSGProgramChunkBase.inl.
References osg::ProgramChunkBase::_mfParamValues.
00083 { 00084 return &_mfParamValues; 00085 }
| MFString * osg::ProgramChunkBase::getMFParamNames | ( | void | ) | [inline, inherited] |
Definition at line 89 of file OSGProgramChunkBase.inl.
References osg::ProgramChunkBase::_mfParamNames.
00090 { 00091 return &_mfParamNames; 00092 }
| std::string & osg::ProgramChunkBase::getProgram | ( | void | ) | [inline, inherited] |
Definition at line 104 of file OSGProgramChunkBase.inl.
References osg::ProgramChunkBase::_sfProgram, and osg::SField< FieldTypeT, fieldNameSpace >::getValue().
Referenced by osg::ProgramChunk::activate(), osg::ProgramChunk::changeFrom(), osg::ProgramChunk::deactivate(), osg::ProgramChunk::handleGL(), osg::ProgramChunk::operator==(), osg::ProgramChunk::printCompileError(), and osg::ProgramChunk::read().
00105 { 00106 return _sfProgram.getValue(); 00107 }
| const std::string & osg::ProgramChunkBase::getProgram | ( | void | ) | const [inline, inherited] |
Definition at line 111 of file OSGProgramChunkBase.inl.
References osg::ProgramChunkBase::_sfProgram, and osg::SField< FieldTypeT, fieldNameSpace >::getValue().
00112 { 00113 return _sfProgram.getValue(); 00114 }
Definition at line 147 of file OSGProgramChunkBase.inl.
References osg::ProgramChunkBase::_mfParamValues.
Referenced by osg::ProgramChunk::operator==().
00148 { 00149 return _mfParamValues[index]; 00150 }
| MFVec4f & osg::ProgramChunkBase::getParamValues | ( | void | ) | [inline, inherited] |
Definition at line 154 of file OSGProgramChunkBase.inl.
References osg::ProgramChunkBase::_mfParamValues.
Referenced by osg::ProgramChunk::getParameter(), osg::ProgramChunk::handleGL(), osg::ProgramChunk::operator==(), and osg::ProgramChunk::setParameter().
00155 { 00156 return _mfParamValues; 00157 }
| const MFVec4f & osg::ProgramChunkBase::getParamValues | ( | void | ) | const [inline, inherited] |
Definition at line 161 of file OSGProgramChunkBase.inl.
References osg::ProgramChunkBase::_mfParamValues.
00162 { 00163 return _mfParamValues; 00164 }
| std::string & osg::ProgramChunkBase::getParamNames | ( | const UInt32 | index | ) | [inline, inherited] |
Definition at line 168 of file OSGProgramChunkBase.inl.
References osg::ProgramChunkBase::_mfParamNames.
Referenced by osg::ProgramChunk::operator==().
00169 { 00170 return _mfParamNames[index]; 00171 }
| MFString & osg::ProgramChunkBase::getParamNames | ( | void | ) | [inline, inherited] |
Definition at line 175 of file OSGProgramChunkBase.inl.
References osg::ProgramChunkBase::_mfParamNames.
Referenced by osg::ProgramChunk::addParameter(), osg::ProgramChunk::findParameter(), and osg::ProgramChunk::operator==().
00176 { 00177 return _mfParamNames; 00178 }
| const MFString & osg::ProgramChunkBase::getParamNames | ( | void | ) | const [inline, inherited] |
Definition at line 182 of file OSGProgramChunkBase.inl.
References osg::ProgramChunkBase::_mfParamNames.
00183 { 00184 return _mfParamNames; 00185 }
| void osg::ProgramChunkBase::setProgram | ( | const std::string & | value | ) | [inline, inherited] |
Definition at line 118 of file OSGProgramChunkBase.inl.
References osg::ProgramChunkBase::_sfProgram, and osg::SField< FieldTypeT, fieldNameSpace >::setValue().
Referenced by osg::FatBorderChunk::activateWithFragmentBasedLighting(), and osg::FatBorderChunk::activateWithStandardLighting().
00119 { 00120 _sfProgram.setValue(value); 00121 }
| SFUInt32 * osg::ProgramChunkBase::getSFGLId | ( | void | ) | [inline, protected, inherited] |
Definition at line 96 of file OSGProgramChunkBase.inl.
References osg::ProgramChunkBase::_sfGLId.
00097 { 00098 return &_sfGLId; 00099 }
| UInt32 & osg::ProgramChunkBase::getGLId | ( | void | ) | [inline, protected, inherited] |
Definition at line 125 of file OSGProgramChunkBase.inl.
References osg::ProgramChunkBase::_sfGLId, and osg::SField< FieldTypeT, fieldNameSpace >::getValue().
Referenced by osg::ProgramChunk::activate(), osg::ProgramChunk::changed(), osg::ProgramChunk::changeFrom(), osg::ProgramChunk::deactivate(), and osg::ProgramChunk::~ProgramChunk().
00126 { 00127 return _sfGLId.getValue(); 00128 }
| const UInt32 & osg::ProgramChunkBase::getGLId | ( | void | ) | const [inline, protected, inherited] |
Definition at line 132 of file OSGProgramChunkBase.inl.
References osg::ProgramChunkBase::_sfGLId, and osg::SField< FieldTypeT, fieldNameSpace >::getValue().
00133 { 00134 return _sfGLId.getValue(); 00135 }
| void osg::ProgramChunkBase::setGLId | ( | const UInt32 & | value | ) | [inline, protected, inherited] |
Definition at line 139 of file OSGProgramChunkBase.inl.
References osg::ProgramChunkBase::_sfGLId, and osg::SField< FieldTypeT, fieldNameSpace >::setValue().
Referenced by onCreate(), and osg::FragmentProgramChunk::onCreate().
| UInt32 osg::StateChunk::getClassId | ( | void | ) | const [inline, inherited] |
Definition at line 48 of file OSGStateChunk.inl.
References osg::StateChunk::getClass(), and osg::StateChunkClass::getId().
00049 { 00050 return getClass()->getId(); 00051 }
| void StateChunk::update | ( | DrawActionBase * | action | ) | [virtual, inherited] |
| SFBool * osg::StateChunkBase::getSFIgnore | ( | void | ) | [inline, inherited] |
Definition at line 75 of file OSGStateChunkBase.inl.
References osg::StateChunkBase::_sfIgnore.
00076 { 00077 return &_sfIgnore; 00078 }
| bool & osg::StateChunkBase::getIgnore | ( | void | ) | [inline, inherited] |
Definition at line 83 of file OSGStateChunkBase.inl.
References osg::StateChunkBase::_sfIgnore, and osg::SField< FieldTypeT, fieldNameSpace >::getValue().
00084 { 00085 return _sfIgnore.getValue(); 00086 }
| const bool & osg::StateChunkBase::getIgnore | ( | void | ) | const [inline, inherited] |
Definition at line 90 of file OSGStateChunkBase.inl.
References osg::StateChunkBase::_sfIgnore, and osg::SField< FieldTypeT, fieldNameSpace >::getValue().
00091 { 00092 return _sfIgnore.getValue(); 00093 }
| void osg::StateChunkBase::setIgnore | ( | const bool & | value | ) | [inline, inherited] |
Definition at line 97 of file OSGStateChunkBase.inl.
References osg::StateChunkBase::_sfIgnore, and osg::SField< FieldTypeT, fieldNameSpace >::setValue().
| MFFieldContainerPtr & Attachment::getParents | ( | void | ) | [inherited] |
| const MFFieldContainerPtr & Attachment::getParents | ( | void | ) | const [inherited] |
Definition at line 100 of file OSGAttachment.cpp.
References osg::Attachment::_parents.
00101 { 00102 return _parents; 00103 }
| MFFieldContainerPtr * Attachment::getMFParents | ( | void | ) | [inherited] |
Definition at line 105 of file OSGAttachment.cpp.
References osg::Attachment::_parents.
Referenced by osg::DVRLookupTable::changed().
00106 { 00107 return &_parents; 00108 }
| void Attachment::addParent | ( | FieldContainerPtr | parent | ) | [inherited] |
Definition at line 110 of file OSGAttachment.cpp.
References osg::Attachment::_parents, and osg::MField< FieldTypeT, fieldNameSpace >::push_back().
| void Attachment::subParent | ( | FieldContainerPtr | parent | ) | [inherited] |
Definition at line 115 of file OSGAttachment.cpp.
References osg::Attachment::_parents, osg::MField< FieldTypeT, fieldNameSpace >::end(), osg::MField< FieldTypeT, fieldNameSpace >::erase(), and osg::MField< FieldTypeT, fieldNameSpace >::find().
00116 { 00117 MFFieldContainerPtr::iterator parentIt = _parents.find(parent); 00118 00119 if(parentIt != _parents.end()) 00120 { 00121 _parents.erase(parentIt); 00122 } 00123 }
| Int32 Attachment::findParent | ( | FieldContainerPtr | parent | ) | [inherited] |
Definition at line 125 of file OSGAttachment.cpp.
References osg::Attachment::_parents, osg::MField< FieldTypeT, fieldNameSpace >::begin(), osg::MField< FieldTypeT, fieldNameSpace >::end(), and osg::MField< FieldTypeT, fieldNameSpace >::find().
00126 { 00127 MFFieldContainerPtr::iterator parentIt = _parents.find(parent); 00128 00129 if(parentIt != _parents.end()) 00130 { 00131 return parentIt - _parents.begin(); 00132 } 00133 else 00134 { 00135 return -1; 00136 } 00137 }
| SFBool & Attachment::getInternal | ( | void | ) | [inherited] |
Definition at line 142 of file OSGAttachment.cpp.
References osg::Attachment::_sfInternal.
00143 { 00144 return _sfInternal; 00145 }
| const SFBool & Attachment::getInternal | ( | void | ) | const [inherited] |
Definition at line 147 of file OSGAttachment.cpp.
References osg::Attachment::_sfInternal.
00148 { 00149 return _sfInternal; 00150 }
| SFBool * Attachment::getSFInternal | ( | void | ) | [inherited] |
Definition at line 152 of file OSGAttachment.cpp.
References osg::Attachment::_sfInternal.
00153 { 00154 return &_sfInternal; 00155 }
| void Attachment::setInternal | ( | bool | bVal | ) | [inherited] |
Definition at line 157 of file OSGAttachment.cpp.
References osg::Attachment::_sfInternal, and osg::SField< FieldTypeT, fieldNameSpace >::setValue().
00158 { 00159 _sfInternal.setValue(bVal); 00160 }
| void Attachment::onDestroy | ( | void | ) | [protected, virtual, inherited] |
Reimplemented from osg::FieldContainer.
Reimplemented in osg::CubeTextureChunk, osg::TextureChunk, osg::ShaderParameterChunk, and osg::SHLChunk.
Definition at line 285 of file OSGAttachment.cpp.
Referenced by osg::TextureChunk::onDestroy(), and osg::ShaderParameterChunk::onDestroy().
| UInt16 osg::FieldContainer::getClassGroupId | ( | void | ) | [inline, static, inherited] |
Definition at line 71 of file OSGFieldContainerImpl.inl.
References osg::FieldContainer::_type, and osg::FieldContainerType::getGroupId().
00072 { 00073 return _type.getGroupId(); 00074 }
| UInt32 osg::FieldContainer::getTypeId | ( | void | ) | const [inline, inherited] |
Definition at line 77 of file OSGFieldContainerImpl.inl.
References osg::TypeBase::getId(), and osg::FieldContainer::getType().
Referenced by osg::TextureChunk::changeFrom(), and osg::CubeTextureChunk::changeFrom().
00078 { 00079 return getType().getId(); 00080 }
| UInt16 osg::FieldContainer::getGroupId | ( | void | ) | const [inline, inherited] |
Definition at line 83 of file OSGFieldContainerImpl.inl.
References osg::FieldContainerType::getGroupId(), and osg::FieldContainer::getType().
Referenced by osg::fcptrAttributeMap(), osg::Image::setAttachmentField(), and osg::stringAttributeMap().
00084 { 00085 return getType().getGroupId(); 00086 }
| const Char8 * osg::FieldContainer::getTypeName | ( | void | ) | const [inline, inherited] |
Definition at line 89 of file OSGFieldContainerImpl.inl.
References osg::TypeBase::getCName(), and osg::FieldContainer::getType().
00090 { 00091 return getType().getCName(); 00092 }
Generic Field Access
Definition at line 95 of file OSGFieldContainerImpl.inl.
References osg::FieldDescription::getField(), osg::FieldContainerType::getFieldDescription(), and osg::FieldContainer::getType().
Referenced by osg::QFCItem::expand(), osg::VRMLShapeDesc::getFieldAndDesc(), osg::QFieldViewBase::getFieldPtr(), osg::QFieldEditorBase::getFieldPtr(), osg::getParentsField(), and osg::QFCItem::setup().
00096 { 00097 const FieldDescription *desc = getType().getFieldDescription(fieldId); 00098 00099 return desc ? desc->getField(*this) : NULL; 00100 }
Generic Field Access
Definition at line 103 of file OSGFieldContainerImpl.inl.
References osg::FieldContainerType::findFieldDescription(), osg::FieldDescription::getField(), and osg::FieldContainer::getType().
00104 { 00105 const FieldDescription *desc =getType().findFieldDescription(fieldName); 00106 00107 return desc ? desc->getField(*this) : NULL; 00108 }
| void osg::FieldContainer::newPtr | ( | ObjectPtrT & | result, | |
| const typename ObjectPtrT::StoredObjectType * | prototypeP | |||
| ) | [inline, static, protected, inherited] |
Definition at line 138 of file OSGFieldContainerImpl.inl.
References osg::ChangeList::addCreated(), osg::PThreadBase::getAspect(), osg::PThreadBase::getCurrentChangeList(), osg::ThreadManager::getNumAspects(), osg::FieldContainerFactory::registerFieldContainer(), and osg::FieldContainerFactory::the().
Referenced by osg::XWindowBase::createEmpty(), osg::WIN32WindowBase::createEmpty(), osg::ViewportBase::createEmpty(), osg::VertexProgramChunkBase::createEmpty(), osg::TwoSidedLightingChunkBase::createEmpty(), osg::TransformChunkBase::createEmpty(), osg::TransformBase::createEmpty(), osg::TileCameraDecoratorBase::createEmpty(), osg::TextureTransformChunkBase::createEmpty(), osg::TextureGrabForegroundBase::createEmpty(), osg::TextureGrabBackgroundBase::createEmpty(), osg::TextureChunkBase::createEmpty(), osg::TextureBackgroundBase::createEmpty(), osg::TexGenChunkBase::createEmpty(), osg::SwitchMaterialBase::createEmpty(), osg::SwitchBase::createEmpty(), osg::SurfaceBase::createEmpty(), osg::StringAttributeMapBase::createEmpty(), osg::StereoBufferViewportBase::createEmpty(), osg::StencilChunkBase::createEmpty(), osg::StateSortingGroupBase::createEmpty(), osg::StateBase::createEmpty(), osg::SpotLightBase::createEmpty(), osg::SortFirstWindowBase::createEmpty(), osg::SolidBackgroundBase::createEmpty(), osg::SlicesBase::createEmpty(), osg::SkyBackgroundBase::createEmpty(), osg::SimpleTexturedMaterialBase::createEmpty(), osg::SimpleStatisticsForegroundBase::createEmpty(), osg::SimpleMaterialBase::createEmpty(), osg::SHLParameterChunkBase::createEmpty(), osg::SHLChunkBase::createEmpty(), osg::ShearedStereoCameraDecoratorBase::createEmpty(), osg::ShaderParameterVec4fBase::createEmpty(), osg::ShaderParameterVec3fBase::createEmpty(), osg::ShaderParameterVec2fBase::createEmpty(), osg::ShaderParameterStringBase::createEmpty(), osg::ShaderParameterRealBase::createEmpty(), osg::ShaderParameterMVec4fBase::createEmpty(), osg::ShaderParameterMVec3fBase::createEmpty(), osg::ShaderParameterMVec2fBase::createEmpty(), osg::ShaderParameterMRealBase::createEmpty(), osg::ShaderParameterMMatrixBase::createEmpty(), osg::ShaderParameterMIntBase::createEmpty(), osg::ShaderParameterMatrixBase::createEmpty(), osg::ShaderParameterIntBase::createEmpty(), osg::ShaderParameterBoolBase::createEmpty(), osg::ScreenGroupBase::createEmpty(), osg::SClipPlaneChunkBase::createEmpty(), osg::ResolutionDisplayFilterBase::createEmpty(), osg::RenderOptionsBase::createEmpty(), osg::RegisterCombinersChunkBase::createEmpty(), osg::QTWindowBase::createEmpty(), osg::ProxyGroupBase::createEmpty(), osg::ProjectionCameraDecoratorBase::createEmpty(), osg::PolygonForegroundBase::createEmpty(), osg::PolygonChunkBase::createEmpty(), osg::PolygonBackgroundBase::createEmpty(), osg::PointLightBase::createEmpty(), osg::PointChunkBase::createEmpty(), osg::PhongMaterialBase::createEmpty(), osg::PerspectiveCameraBase::createEmpty(), osg::PassiveWindowBase::createEmpty(), osg::PassiveViewportBase::createEmpty(), osg::PassiveBackgroundBase::createEmpty(), osg::ParticlesBase::createEmpty(), osg::OrthographicCameraBase::createEmpty(), osg::OffCenterPerspectiveCameraBase::createEmpty(), osg::MultiPassMaterialBase::createEmpty(), osg::MultiDisplayWindowBase::createEmpty(), osg::MatrixCameraDecoratorBase::createEmpty(), osg::MatrixCameraBase::createEmpty(), osg::MaterialPoolBase::createEmpty(), osg::MaterialGroupBase::createEmpty(), osg::MaterialChunkBase::createEmpty(), osg::LogicOpChunkBase::createEmpty(), osg::LineChunkBase::createEmpty(), osg::LightModelChunkBase::createEmpty(), osg::LightEnvBase::createEmpty(), osg::LightChunkBase::createEmpty(), osg::InverseTransformBase::createEmpty(), osg::InlineBase::createEmpty(), osg::ImageForegroundBase::createEmpty(), osg::ImageBase::createEmpty(), osg::ImageBackgroundBase::createEmpty(), osg::GroupBase::createEmpty(), osg::GraphicStatisticsForegroundBase::createEmpty(), osg::GradientBackgroundBase::createEmpty(), osg::GrabForegroundBase::createEmpty(), osg::GLUTWindowBase::createEmpty(), osg::GeometryBase::createEmpty(), osg::FresnelMaterialBase::createEmpty(), osg::FragmentProgramChunkBase::createEmpty(), osg::FileGrabForegroundBase::createEmpty(), osg::FCPtrAttributeMapBase::createEmpty(), osg::FBOViewportBase::createEmpty(), osg::FatBorderChunkBase::createEmpty(), osg::DVRVolumeTextureBase::createEmpty(), osg::DVRVolumeBase::createEmpty(), osg::DVRSimpleShaderBase::createEmpty(), osg::DVRSimpleLUTShaderBase::createEmpty(), osg::DVRMtexLUTShaderBase::createEmpty(), osg::DVRLookupTableBase::createEmpty(), osg::DVRIsoSurfaceBase::createEmpty(), osg::DVRIsoShaderBase::createEmpty(), osg::DVRGeometryBase::createEmpty(), osg::DVRClipObjectsBase::createEmpty(), osg::DVRClipGeometryBase::createEmpty(), osg::DVRAppearanceBase::createEmpty(), osg::DistortionDisplayFilterBase::createEmpty(), osg::DistanceLODBase::createEmpty(), osg::DisplayFilterForegroundBase::createEmpty(), osg::DisplayCalibrationBase::createEmpty(), osg::DirectionalLightBase::createEmpty(), osg::DepthClearBackgroundBase::createEmpty(), osg::DepthChunkBase::createEmpty(), osg::CubeTextureChunkBase::createEmpty(), osg::ComponentTransformBase::createEmpty(), osg::ColorMaskChunkBase::createEmpty(), osg::ColorDisplayFilterBase::createEmpty(), osg::ColorBufferViewportBase::createEmpty(), osg::ClusterWindowBase::createEmpty(), osg::ClipPlaneChunkBase::createEmpty(), osg::ClipPlaneBase::createEmpty(), osg::ChunkMaterialBase::createEmpty(), osg::BlendChunkBase::createEmpty(), osg::BillboardBase::createEmpty(), osg::XWindowBase::shallowCopy(), osg::WIN32WindowBase::shallowCopy(), osg::ViewportBase::shallowCopy(), osg::VertexProgramChunkBase::shallowCopy(), osg::TwoSidedLightingChunkBase::shallowCopy(), osg::TransformChunkBase::shallowCopy(), osg::TransformBase::shallowCopy(), osg::TileCameraDecoratorBase::shallowCopy(), osg::TextureTransformChunkBase::shallowCopy(), osg::TextureGrabForegroundBase::shallowCopy(), osg::TextureGrabBackgroundBase::shallowCopy(), osg::TextureChunkBase::shallowCopy(), osg::TextureBackgroundBase::shallowCopy(), osg::TexGenChunkBase::shallowCopy(), osg::SwitchMaterialBase::shallowCopy(), osg::SwitchBase::shallowCopy(), osg::SurfaceBase::shallowCopy(), osg::StringAttributeMapBase::shallowCopy(), osg::StereoBufferViewportBase::shallowCopy(), osg::StencilChunkBase::shallowCopy(), osg::StateSortingGroupBase::shallowCopy(), osg::StateBase::shallowCopy(), osg::SpotLightBase::shallowCopy(), osg::SortFirstWindowBase::shallowCopy(), osg::SolidBackgroundBase::shallowCopy(), osg::SlicesBase::shallowCopy(), osg::SkyBackgroundBase::shallowCopy(), osg::SimpleTexturedMaterialBase::shallowCopy(), osg::SimpleStatisticsForegroundBase::shallowCopy(), osg::SimpleMaterialBase::shallowCopy(), osg::SHLParameterChunkBase::shallowCopy(), osg::SHLChunkBase::shallowCopy(), osg::ShearedStereoCameraDecoratorBase::shallowCopy(), osg::ShaderParameterVec4fBase::shallowCopy(), osg::ShaderParameterVec3fBase::shallowCopy(), osg::ShaderParameterVec2fBase::shallowCopy(), osg::ShaderParameterStringBase::shallowCopy(), osg::ShaderParameterRealBase::shallowCopy(), osg::ShaderParameterMVec4fBase::shallowCopy(), osg::ShaderParameterMVec3fBase::shallowCopy(), osg::ShaderParameterMVec2fBase::shallowCopy(), osg::ShaderParameterMRealBase::shallowCopy(), osg::ShaderParameterMMatrixBase::shallowCopy(), osg::ShaderParameterMIntBase::shallowCopy(), osg::ShaderParameterMatrixBase::shallowCopy(), osg::ShaderParameterIntBase::shallowCopy(), osg::ShaderParameterBoolBase::shallowCopy(), osg::ScreenGroupBase::shallowCopy(), osg::SClipPlaneChunkBase::shallowCopy(), osg::ResolutionDisplayFilterBase::shallowCopy(), osg::RenderOptionsBase::shallowCopy(), osg::RegisterCombinersChunkBase::shallowCopy(), osg::QTWindowBase::shallowCopy(), osg::ProxyGroupBase::shallowCopy(), osg::ProjectionCameraDecoratorBase::shallowCopy(), osg::PolygonForegroundBase::shallowCopy(), osg::PolygonChunkBase::shallowCopy(), osg::PolygonBackgroundBase::shallowCopy(), osg::PointLightBase::shallowCopy(), osg::PointChunkBase::shallowCopy(), osg::PhongMaterialBase::shallowCopy(), osg::PerspectiveCameraBase::shallowCopy(), osg::PassiveWindowBase::shallowCopy(), osg::PassiveViewportBase::shallowCopy(), osg::PassiveBackgroundBase::shallowCopy(), osg::ParticlesBase::shallowCopy(), osg::OrthographicCameraBase::shallowCopy(), osg::OffCenterPerspectiveCameraBase::shallowCopy(), osg::MultiPassMaterialBase::shallowCopy(), osg::MultiDisplayWindowBase::shallowCopy(), osg::MatrixCameraDecoratorBase::shallowCopy(), osg::MatrixCameraBase::shallowCopy(), osg::MaterialPoolBase::shallowCopy(), osg::MaterialGroupBase::shallowCopy(), osg::MaterialChunkBase::shallowCopy(), osg::LogicOpChunkBase::shallowCopy(), osg::LineChunkBase::shallowCopy(), osg::LightModelChunkBase::shallowCopy(), osg::LightEnvBase::shallowCopy(), osg::LightChunkBase::shallowCopy(), osg::InverseTransformBase::shallowCopy(), osg::InlineBase::shallowCopy(), osg::ImageForegroundBase::shallowCopy(), osg::ImageBase::shallowCopy(), osg::ImageBackgroundBase::shallowCopy(), osg::GroupBase::shallowCopy(), osg::GraphicStatisticsForegroundBase::shallowCopy(), osg::GradientBackgroundBase::shallowCopy(), osg::GrabForegroundBase::shallowCopy(), osg::GLUTWindowBase::shallowCopy(), osg::GeometryBase::shallowCopy(), osg::FresnelMaterialBase::shallowCopy(), osg::FragmentProgramChunkBase::shallowCopy(), osg::FileGrabForegroundBase::shallowCopy(), osg::FCPtrAttributeMapBase::shallowCopy(), osg::FBOViewportBase::shallowCopy(), osg::FatBorderChunkBase::shallowCopy(), osg::DVRVolumeTextureBase::shallowCopy(), osg::DVRVolumeBase::shallowCopy(), osg::DVRSimpleShaderBase::shallowCopy(), osg::DVRSimpleLUTShaderBase::shallowCopy(), osg::DVRMtexLUTShaderBase::shallowCopy(), osg::DVRLookupTableBase::shallowCopy(), osg::DVRIsoSurfaceBase::shallowCopy(), osg::DVRIsoShaderBase::shallowCopy(), osg::DVRGeometryBase::shallowCopy(), osg::DVRClipObjectsBase::shallowCopy(), osg::DVRClipGeometryBase::shallowCopy(), osg::DVRAppearanceBase::shallowCopy(), osg::DistortionDisplayFilterBase::shallowCopy(), osg::DistanceLODBase::shallowCopy(), osg::DisplayFilterForegroundBase::shallowCopy(), osg::DisplayCalibrationBase::shallowCopy(), osg::DirectionalLightBase::shallowCopy(), osg::DepthClearBackgroundBase::shallowCopy(), osg::DepthChunkBase::shallowCopy(), osg::CubeTextureChunkBase::shallowCopy(), osg::ComponentTransformBase::shallowCopy(), osg::ColorMaskChunkBase::shallowCopy(), osg::ColorDisplayFilterBase::shallowCopy(), osg::ColorBufferViewportBase::shallowCopy(), osg::ClusterWindowBase::shallowCopy(), osg::ClipPlaneChunkBase::shallowCopy(), osg::ClipPlaneBase::shallowCopy(), osg::ChunkMaterialBase::shallowCopy(), osg::BlendChunkBase::shallowCopy(), and osg::BillboardBase::shallowCopy().
00141 { 00142 typedef typename ObjectPtrT::StoredObjectType ObjectType; 00143 00144 UInt8 *pTmp; 00145 00146 result._containerSize = sizeof(ObjectType); 00147 00148 pTmp = 00149 static_cast<UInt8 *>(operator new( 00150 sizeof(Int32) + // ReferenceCount 00151 sizeof(UInt32) + // ContainerId 00152 sizeof(ObjectType) * ThreadManager::getNumAspects())); 00153 00154 *(reinterpret_cast<Int32 *>(pTmp)) = 0; 00155 00156 pTmp += sizeof(Int32); 00157 00158 result._storeP = (pTmp + sizeof(UInt32)); 00159 00160 #ifdef OSG_DEBUG_FCPTR 00161 result._typedStoreP = reinterpret_cast<FieldContainer *>(result._storeP); 00162 #endif 00163 00164 *(reinterpret_cast<UInt32 *>(pTmp)) = 00165 FieldContainerFactory::the()->registerFieldContainer(result); 00166 00167 Thread::getCurrentChangeList()->addCreated( 00168 *(reinterpret_cast<UInt32 *>(pTmp))); 00169 00170 pTmp += sizeof(UInt32); 00171 00172 ObjectType *aObject = reinterpret_cast<ObjectType *>(pTmp); 00173 00174 for(UInt32 i = 0; i < ThreadManager::getNumAspects(); i++) 00175 { 00176 pTmp = 00177 reinterpret_cast<UInt8 *>(new (pTmp) ObjectType(*prototypeP)); 00178 00179 pTmp += sizeof(ObjectType); 00180 } 00181 00182 result->onCreate(prototypeP); 00183 00184 for(UInt32 i = 0; i < ThreadManager::getNumAspects(); i++) 00185 { 00186 aObject[i].onCreateAspect(aObject, prototypeP); 00187 } 00188 00189 #if defined(OSG_GV_BETA) && defined(OSG_DBG_MEM) 00190 00191 fprintf(stderr, "GV_MEM_FC_DBG : (%u) cc (%p|%u)\n", 00192 Thread::getAspect(), 00193 result._storeP, 00194 // ObjectType::getClassType().getCName(), 00195 ObjectType::getClassType().getId()); 00196 #endif 00197 00198 #ifdef OSG_DEBUG_TYPED_FCPTR 00199 result.updateTypedStore(); 00200 #endif 00201 }
| void osg::FieldContainer::newPtr | ( | ObjectPtrT & | result | ) | [inline, static, protected, inherited] |
Definition at line 204 of file OSGFieldContainerImpl.inl.
References osg::ChangeList::addCreated(), osg::PThreadBase::getAspect(), osg::PThreadBase::getCurrentChangeList(), osg::ThreadManager::getNumAspects(), osg::FieldContainerFactory::registerFieldContainer(), and osg::FieldContainerFactory::the().
00205 { 00206 typedef typename ObjectPtrT::StoredObjectType ObjectType; 00207 00208 UInt8 *pTmp; 00209 00210 result._containerSize = sizeof(ObjectType); 00211 00212 pTmp = 00213 static_cast<UInt8 *>(operator new( 00214 sizeof(Int32) + // ReferenceCount 00215 sizeof(UInt32) + // ContainerId 00216 sizeof(ObjectType) * ThreadManager::getNumAspects())); 00217 00218 *(reinterpret_cast<Int32 *>(pTmp)) = 0; 00219 00220 pTmp += sizeof(Int32); 00221 00222 result._storeP = (pTmp + sizeof(UInt32)); 00223 00224 #ifdef OSG_DEBUG_FCPTR 00225 result._typedStoreP = reinterpret_cast<FieldContainer *>(result._storeP); 00226 #endif 00227 00228 *(reinterpret_cast<UInt32 *>(pTmp)) = 00229 FieldContainerFactory::the()->registerFieldContainer(result); 00230 00231 Thread::getCurrentChangeList()->addCreated( 00232 *(reinterpret_cast<UInt32 *>(pTmp))); 00233 00234 pTmp += sizeof(UInt32); 00235 00236 ObjectType *aObject = reinterpret_cast<ObjectType *>(pTmp); 00237 00238 for(UInt32 i = 0; i < ThreadManager::getNumAspects(); i++) 00239 { 00240 pTmp = reinterpret_cast<UInt8 *>(new (pTmp) ObjectType()); 00241 00242 pTmp += sizeof(ObjectType); 00243 } 00244 00245 result->onCreate(); 00246 00247 for(UInt32 i = 0; i < ThreadManager::getNumAspects(); i++) 00248 { 00249 aObject[i].onCreateAspect(aObject); 00250 } 00251 00252 #if defined(OSG_GV_BETA) && defined(OSG_DBG_MEM) 00253 fprintf(stderr, "GV_MEM_FC_DBG : (%u) c (%p|%u)\n", 00254 Thread::getAspect(), 00255 result._storeP, 00256 // ObjectType::getClassType().getCName(), 00257 ObjectType::getClassType().getId()); 00258 #endif 00259 00260 #ifdef OSG_DEBUG_TYPED_FCPTR 00261 result.updateTypedStore(); 00262 #endif 00263 }
| void osg::FieldContainer::beginEditX | ( | const BitVector & | whichField, | |
| FieldTypeT & | field | |||
| ) | [inline, protected, inherited] |
| void osg::FieldContainer::endEditX | ( | const BitVector & | whichField, | |
| FieldTypeT & | field | |||
| ) | [inline, protected, inherited] |
Definition at line 291 of file OSGFieldContainerImpl.inl.
References osg::endEditCP().
00292 { 00293 FieldContainerPtr tmpPtr(this); 00294 endEditCP(tmpPtr, whichField); 00295 }
| void osg::FieldContainer::onCreateAspect | ( | const FieldContainer * | aspect0, | |
| const FieldContainer * | source = NULL | |||
| ) | [inline, protected, inherited] |
friend class FieldContainer [friend] |
Reimplemented from osg::VertexProgramChunkBase.
Reimplemented in osg::FatBorderChunk, and osg::FatBorderChunkBase.
Definition at line 136 of file OSGVertexProgramChunk.h.
friend class VertexProgramChunkBase [friend] |
Definition at line 137 of file OSGVertexProgramChunk.h.
StateChunkClass VertexProgramChunk::_class [static, private] |
Reimplemented from osg::ProgramChunk.
Definition at line 139 of file OSGVertexProgramChunk.h.
Referenced by getClass(), and getStaticClass().
UInt32 VertexProgramChunk::_arbVertexProgram [static, private] |
Definition at line 145 of file OSGVertexProgramChunk.h.
Referenced by getExtension(), handleGL(), and VertexProgramChunk().
const osg::BitVector VertexProgramChunkBase::MTInfluenceMask [static, inherited] |
Initial value:
(Inherited::MTInfluenceMask) |
(static_cast<BitVector>(0x0) << Inherited::NextFieldId)
Reimplemented from osg::ProgramChunkBase.
Reimplemented in osg::FatBorderChunkBase.
Definition at line 92 of file OSGVertexProgramChunkBase.h.
const osg::BitVector ProgramChunkBase::ProgramFieldMask [static, inherited] |
Initial value:
(TypeTraits<BitVector>::One << ProgramChunkBase::ProgramFieldId)
Definition at line 104 of file OSGProgramChunkBase.h.
Referenced by osg::FatBorderChunk::activateWithFragmentBasedLighting(), osg::FatBorderChunk::activateWithStandardLighting(), osg::ProgramChunk::changed(), osg::ProgramChunkBase::copyFromBin(), osg::ProgramChunkBase::copyToBin(), osg::ProgramChunkBase::executeSyncImpl(), and osg::ProgramChunkBase::getBinSize().
const osg::BitVector ProgramChunkBase::ParamValuesFieldMask [static, inherited] |
Initial value:
(TypeTraits<BitVector>::One << ProgramChunkBase::ParamValuesFieldId)
Definition at line 105 of file OSGProgramChunkBase.h.
Referenced by osg::DVRIsoShader::activate_FragmentProgramShading(), osg::ProgramChunk::changed(), osg::ProgramChunkBase::copyFromBin(), osg::ProgramChunkBase::copyToBin(), osg::ProgramChunkBase::executeSyncImpl(), osg::ProgramChunkBase::getBinSize(), osg::DisplayCalibration::updateGamma(), and osg::DisplayCalibration::updateMatrix().
const osg::BitVector ProgramChunkBase::ParamNamesFieldMask [static, inherited] |
Initial value:
(TypeTraits<BitVector>::One << ProgramChunkBase::ParamNamesFieldId)
Definition at line 106 of file OSGProgramChunkBase.h.
Referenced by osg::ProgramChunkBase::copyFromBin(), osg::ProgramChunkBase::copyToBin(), osg::ProgramChunkBase::executeSyncImpl(), and osg::ProgramChunkBase::getBinSize().
const osg::BitVector ProgramChunkBase::GLIdFieldMask [static, inherited] |
Initial value:
(TypeTraits<BitVector>::One << ProgramChunkBase::GLIdFieldId)
Definition at line 107 of file OSGProgramChunkBase.h.
Referenced by osg::ProgramChunkBase::copyFromBin(), osg::ProgramChunkBase::copyToBin(), osg::ProgramChunkBase::executeSyncImpl(), osg::ProgramChunkBase::getBinSize(), onCreate(), osg::FragmentProgramChunk::onCreate(), and osg::RemoteAspect::RemoteAspect().
std::string ProgramChunkBase::_sfProgram [protected, inherited] |
The program source code.
Definition at line 179 of file OSGProgramChunkBase.h.
Referenced by osg::ProgramChunkBase::copyFromBin(), osg::ProgramChunkBase::copyToBin(), osg::ProgramChunkBase::executeSyncImpl(), osg::ProgramChunkBase::getBinSize(), osg::ProgramChunkBase::getProgram(), osg::ProgramChunkBase::getSFProgram(), and osg::ProgramChunkBase::setProgram().
Vec4f ProgramChunkBase::_mfParamValues [protected, inherited] |
Program Parameters
Definition at line 180 of file OSGProgramChunkBase.h.
Referenced by osg::ProgramChunkBase::copyFromBin(), osg::ProgramChunkBase::copyToBin(), osg::ProgramChunkBase::executeSyncImpl(), osg::ProgramChunkBase::getBinSize(), osg::ProgramChunkBase::getMFParamValues(), and osg::ProgramChunkBase::getParamValues().
std::string ProgramChunkBase::_mfParamNames [protected, inherited] |
Symbolic names for the program parameters.
Definition at line 181 of file OSGProgramChunkBase.h.
Referenced by osg::ProgramChunkBase::copyFromBin(), osg::ProgramChunkBase::copyToBin(), osg::ProgramChunkBase::executeSyncImpl(), osg::ProgramChunkBase::getBinSize(), osg::ProgramChunkBase::getMFParamNames(), and osg::ProgramChunkBase::getParamNames().
UInt32 ProgramChunkBase::_sfGLId [protected, inherited] |
The OpenGL ID of the program.
Definition at line 182 of file OSGProgramChunkBase.h.
Referenced by osg::ProgramChunkBase::copyFromBin(), osg::ProgramChunkBase::copyToBin(), osg::ProgramChunkBase::executeSyncImpl(), osg::ProgramChunkBase::getBinSize(), osg::ProgramChunkBase::getGLId(), osg::ProgramChunkBase::getSFGLId(), and osg::ProgramChunkBase::setGLId().
const osg::BitVector osg::StateChunkBase::IgnoreFieldMask [static, inherited] |
Initial value:
(TypeTraits<BitVector>::One << StateChunkBase::IgnoreFieldId)
Definition at line 98 of file OSGStateChunkBase.h.
Referenced by osg::StateChunkBase::copyFromBin(), osg::StateChunkBase::copyToBin(), osg::StateChunkBase::executeSyncImpl(), and osg::StateChunkBase::getBinSize().
bool osg::StateChunkBase::_sfIgnore [protected, inherited] |
Enables / disables a chunk
Definition at line 162 of file OSGStateChunkBase.h.
Referenced by osg::StateChunkBase::copyFromBin(), osg::StateChunkBase::copyToBin(), osg::StateChunkBase::executeSyncImpl(), osg::StateChunkBase::getBinSize(), osg::StateChunkBase::getIgnore(), osg::StateChunkBase::getSFIgnore(), and osg::StateChunkBase::setIgnore().
const BitVector Attachment::InternalFieldMask = (1 << Attachment::InternalFieldId) [static, inherited] |
Definition at line 93 of file OSGAttachmentImpl.h.
Referenced by osg::Attachment::copyFromBin(), osg::Attachment::copyToBin(), osg::Attachment::executeSyncImpl(), and osg::Attachment::getBinSize().
const BitVector Attachment::ParentsFieldMask = (1 << Attachment::ParentsFieldId) [static, inherited] |
Definition at line 94 of file OSGAttachmentImpl.h.
Referenced by osg::SharePtrGraphOp::addAttachmentParent(), osg::SharePtrGraphOp::clearAttachmentParent(), osg::SharePtrGraphOp::compareFCs(), osg::Attachment::copyFromBin(), osg::Attachment::copyToBin(), osg::Attachment::executeSyncImpl(), osg::Attachment::getBinSize(), osg::Surface::onDestroy(), osg::Geometry::onDestroy(), osg::Particles::setColors(), osg::Geometry::setColors(), osg::Surface::setControlPoints(), osg::Geometry::setIndices(), osg::Geometry::setLengths(), osg::Particles::setNormals(), osg::Geometry::setNormals(), osg::Particles::setPositions(), osg::Geometry::setPositions(), osg::Geometry::setSecondaryColors(), osg::Particles::setSecPositions(), osg::Geometry::setTexCoords(), osg::Geometry::setTexCoords1(), osg::Geometry::setTexCoords2(), osg::Geometry::setTexCoords3(), osg::Geometry::setTexCoords4(), osg::Geometry::setTexCoords5(), osg::Geometry::setTexCoords6(), osg::Geometry::setTexCoords7(), osg::Surface::setTextureControlPoints(), osg::Geometry::setTypes(), osg::AttachmentContainer::subAttachment(), osg::AttachmentContainer::~AttachmentContainer(), and osg::Particles::~Particles().
SFBool osg::Attachment::_sfInternal [protected, inherited] |
Definition at line 165 of file OSGAttachmentImpl.h.
Referenced by osg::Attachment::copyFromBin(), osg::Attachment::copyToBin(), osg::Attachment::executeSyncImpl(), osg::Attachment::getBinSize(), osg::Attachment::getInternal(), osg::Attachment::getSFInternal(), and osg::Attachment::setInternal().
MFFieldContainerPtr osg::Attachment::_parents [protected, inherited] |
Definition at line 166 of file OSGAttachmentImpl.h.
Referenced by osg::Attachment::addParent(), osg::Attachment::copyFromBin(), osg::Attachment::copyToBin(), osg::Attachment::dump(), osg::Attachment::executeSyncImpl(), osg::Attachment::findParent(), osg::Attachment::getBinSize(), osg::Attachment::getMFParents(), osg::Attachment::getParents(), and osg::Attachment::subParent().
const BitVector osg::FieldContainer::NextFieldMask [static, inherited] |
Initial value:
(TypeTraits<BitVector>::One << NextFieldId)
Definition at line 75 of file OSGFieldContainerImpl.h.
const bool osg::FieldContainer::isNodeCore = false [static, inherited] |
UInt32 osg::FieldContainer::_shares [protected, inherited] |
Definition at line 199 of file OSGFieldContainerImpl.h.
1.5.5