#include <OSGFragmentProgramChunk.h>
Inheritance diagram for osg::FragmentProgramChunk:

Public Types | |
| typedef FragmentProgramChunkPtr | Ptr |
| enum | { ProgramFieldId = Inherited::NextFieldId, ParamValuesFieldId = ProgramFieldId + 1, ParamNamesFieldId = ParamValuesFieldId + 1, GLIdFieldId = ParamNamesFieldId + 1, NextFieldId = GLIdFieldId + 1 } |
Public Member Functions | |
ProgamChunk Commands | |
| *bool | read (const char *file) |
| bool | read (std::istream &stream) |
| bool | addParameter (const char *name, Int16 index) |
| bool | addParameter (const char *name, Int16 index, const Vec4f &value) |
| const Vec4f & | getParameter (Int16 index) |
| const Vec4f & | getParameter (const char *name) |
| const Vec4f & | getParameter (const std::string &name) |
| bool | setParameter (Int16 index, const Vec4f &value) |
| bool | setParameter (const char *name, const Vec4f &value) |
| bool | setParameter (const std::string &name, const Vec4f &value) |
| Int16 | findParameter (const char *name) |
| Int16 | findParameter (const std::string &name) |
State Commands | |
| *virtual void | activate (DrawActionBase *action, UInt32 index=0) |
| virtual void | changeFrom (DrawActionBase *action, StateChunk *old, UInt32 index=0) |
| virtual void | deactivate (DrawActionBase *action, UInt32 index=0) |
| virtual bool | isTransparent (void) const |
Comparison | |
| *virtual Real32 | switchCost (StateChunk *chunk) |
| virtual bool | operator< (const StateChunk &other) const |
| virtual bool | operator== (const StateChunk &other) const |
| virtual bool | operator!= (const StateChunk &other) const |
Field Get | |
| *SFString * | getSFProgram (void) |
| Get the ProgramChunk::_sfProgram field. | |
| MFVec4f * | getMFParamValues (void) |
| Get the ProgramChunk::_mfParamValues field. | |
| MFString * | getMFParamNames (void) |
| Get the ProgramChunk::_mfParamNames field. | |
| std::string & | getProgram (void) |
| Get the value of the ProgramChunk::_sfProgram field. | |
| const std::string & | getProgram (void) const |
| Get the value of the ProgramChunk::_sfProgram field. | |
| Vec4f & | getParamValues (const UInt32 index) |
| Get the value of the index element the ProgramChunk::_mfParamValues field. | |
| MFVec4f & | getParamValues (void) |
| Get the ProgramChunk::_mfParamValues field. | |
| const MFVec4f & | getParamValues (void) const |
| Get the ProgramChunk::_mfParamValues field. | |
| std::string & | getParamNames (const UInt32 index) |
| Get the value of the index element the ProgramChunk::_mfParamNames field. | |
| MFString & | getParamNames (void) |
| Get the ProgramChunk::_mfParamNames field. | |
| const MFString & | getParamNames (void) const |
| Get the ProgramChunk::_mfParamNames field. | |
Field Set | |
| *void | setProgram (const std::string &value) |
| Set the value of the ProgramChunk::_sfProgram field. | |
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. | |
ProgamChunk Commands | |
| *bool | read (const char *file) |
| bool | read (std::istream &stream) |
| bool | addParameter (const char *name, Int16 index) |
| bool | addParameter (const char *name, Int16 index, const Vec4f &value) |
| const Vec4f & | getParameter (Int16 index) |
| const Vec4f & | getParameter (const char *name) |
| const Vec4f & | getParameter (const std::string &name) |
| bool | setParameter (Int16 index, const Vec4f &value) |
| bool | setParameter (const char *name, const Vec4f &value) |
| bool | setParameter (const std::string &name, const Vec4f &value) |
| Int16 | findParameter (const char *name) |
| Int16 | findParameter (const std::string &name) |
State Commands | |
| *virtual void | activate (DrawActionBase *action, UInt32 index=0) |
| virtual void | changeFrom (DrawActionBase *action, StateChunk *old, UInt32 index=0) |
| virtual void | deactivate (DrawActionBase *action, UInt32 index=0) |
| virtual bool | isTransparent (void) const |
Comparison | |
| *virtual Real32 | switchCost (StateChunk *chunk) |
| virtual bool | operator< (const StateChunk &other) const |
| virtual bool | operator== (const StateChunk &other) const |
| virtual bool | operator!= (const StateChunk &other) const |
Field Get | |
| *SFString * | getSFProgram (void) |
| Get the ProgramChunk::_sfProgram field. | |
| MFVec4f * | getMFParamValues (void) |
| Get the ProgramChunk::_mfParamValues field. | |
| MFString * | getMFParamNames (void) |
| Get the ProgramChunk::_mfParamNames field. | |
| std::string & | getProgram (void) |
| Get the value of the ProgramChunk::_sfProgram field. | |
| const std::string & | getProgram (void) const |
| Get the value of the ProgramChunk::_sfProgram field. | |
| Vec4f & | getParamValues (const UInt32 index) |
| Get the value of the index element the ProgramChunk::_mfParamValues field. | |
| MFVec4f & | getParamValues (void) |
| Get the ProgramChunk::_mfParamValues field. | |
| const MFVec4f & | getParamValues (void) const |
| Get the ProgramChunk::_mfParamValues field. | |
| std::string & | getParamNames (const UInt32 index) |
| Get the value of the index element the ProgramChunk::_mfParamNames field. | |
| MFString & | getParamNames (void) |
| Get the ProgramChunk::_mfParamNames field. | |
| const MFString & | getParamNames (void) const |
| Get the ProgramChunk::_mfParamNames field. | |
Field Set | |
| *void | setProgram (const std::string &value) |
| Set the value of the ProgramChunk::_sfProgram field. | |
Static Public Member Functions | |
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 FragmentProgramChunkPtr | create (void) |
| create a new instance of the class | |
| static FragmentProgramChunkPtr | createEmpty (void) |
| create an empty new instance of the class, do not copy the prototype | |
Static Public Attributes | |
| static const osg::BitVector | MTInfluenceMask |
| static const osg::BitVector | ProgramFieldMask |
| static const osg::BitVector | ParamValuesFieldMask |
| static const osg::BitVector | ParamNamesFieldMask |
| static const osg::BitVector | GLIdFieldMask |
| static const BitVector | InternalFieldMask = (1 << Attachment::InternalFieldId) |
| static const BitVector | ParentsFieldMask = (1 << Attachment::ParentsFieldId) |
| static const BitVector | NextFieldMask |
Protected Member Functions | |
Sync | |
| *void | executeSyncImpl (ProgramChunkBase *pOther, const BitVector &whichField) |
Init | |
| *void | onCreate (const ProgramChunk *source=NULL) |
GL | |
| *void | handleGL (Window *win, UInt32 id, GLenum target, UInt32 extension) |
Program-Specific Methods | |
| void | printCompileError (Window *win, UInt32 idstatus) |
Field Get | |
| *SFUInt32 * | getSFGLId (void) |
| Get the ProgramChunk::_sfGLId field. | |
| UInt32 & | getGLId (void) |
| Get the value of the ProgramChunk::_sfGLId field. | |
| const UInt32 & | getGLId (void) const |
| Get the value of the ProgramChunk::_sfGLId field. | |
Field Set | |
| *void | setGLId (const UInt32 &value) |
| Set the value of the ProgramChunk::_sfGLId field. | |
Init | |
| *void | onCreate (const FragmentProgramChunk *source=NULL) |
Constructors | |
| * | FragmentProgramChunk (void) |
| FragmentProgramChunk (const FragmentProgramChunk &source) | |
Destructors | |
| *virtual | ~FragmentProgramChunk (void) |
Program-Specific Methods | |
| *virtual UInt32 | getExtension (void) const |
| virtual GLenum | getTarget (void) const |
| virtual const char * | getTargetName (void) const |
Sync | |
| *void | executeSyncImpl (FragmentProgramChunkBase *pOther, const BitVector &whichField) |
| virtual void | executeSync (FieldContainer &other, const BitVector &whichField) |
Sync | |
| *void | executeSyncImpl (ProgramChunkBase *pOther, const BitVector &whichField) |
Init | |
| *void | onCreate (const ProgramChunk *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. | |
Sync | |
| *void | executeSyncImpl (ProgramChunkBase *pOther, const BitVector &whichField) |
Init | |
| *void | onCreate (const ProgramChunk *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. | |
Protected Attributes | |
Fields | |
| *SFString | _sfProgram |
| MFVec4f | _mfParamValues |
| MFString | _mfParamNames |
| SFUInt32 | _sfGLId |
Fields | |
| *SFString | _sfProgram |
| MFVec4f | _mfParamValues |
| MFString | _mfParamNames |
| SFUInt32 | _sfGLId |
Fields | |
| *SFString | _sfProgram |
| MFVec4f | _mfParamValues |
| MFString | _mfParamNames |
| SFUInt32 | _sfGLId |
Private Types | |
| typedef FragmentProgramChunkBase | Inherited |
Private Member Functions | |
| void | operator= (const FragmentProgramChunk &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 | _arbFragmentProgram |
Friends | |
| class | FieldContainer |
| class | FragmentProgramChunkBase |
Definition at line 55 of file OSGFragmentProgramChunk.h.
|
|
Reimplemented from osg::FragmentProgramChunkBase. Definition at line 59 of file OSGFragmentProgramChunk.h. |
|
|
Reimplemented from osg::ProgramChunkBase. Definition at line 89 of file OSGFragmentProgramChunkBase.h. |
|
|
Reimplemented from osg::Attachment. Definition at line 95 of file OSGProgramChunkBase.h. 00096 { 00097 ProgramFieldId = Inherited::NextFieldId, 00098 ParamValuesFieldId = ProgramFieldId + 1, 00099 ParamNamesFieldId = ParamValuesFieldId + 1, 00100 GLIdFieldId = ParamNamesFieldId + 1, 00101 NextFieldId = GLIdFieldId + 1 00102 };
|
|
|
Definition at line 94 of file OSGFragmentProgramChunk.cpp. References _arbFragmentProgram, and osg::Window::registerExtension(). 00094 : 00095 Inherited() 00096 { 00097 _arbFragmentProgram = Window::registerExtension("GL_ARB_fragment_program"); 00098 }
|
|
|
Definition at line 100 of file OSGFragmentProgramChunk.cpp. 00100 : 00101 Inherited(source) 00102 { 00103 }
|
|
|
Definition at line 105 of file OSGFragmentProgramChunk.cpp.
|
|
|
Reimplemented from osg::ProgramChunk. Definition at line 138 of file OSGFragmentProgramChunk.cpp. References _class. 00139 { 00140 return &_class; 00141 }
|
|
|
Reimplemented from osg::ProgramChunk. Definition at line 46 of file OSGFragmentProgramChunk.inl. References osg::StateChunkClass::getId(), and getStaticClass(). 00047 { 00048 return getStaticClass()->getId(); 00049 }
|
|
|
Reimplemented from osg::ProgramChunk. Definition at line 52 of file OSGFragmentProgramChunk.inl. References _class. Referenced by getStaticClassId(). 00053 { 00054 return &FragmentProgramChunk::_class; 00055 }
|
|
||||||||||||
|
Reimplemented from osg::ProgramChunk. Definition at line 145 of file OSGFragmentProgramChunk.cpp. References osg::ProgramChunk::changed(). 00146 { 00147 Inherited::changed(whichField, origin); 00148 }
|
|
||||||||||||
|
Reimplemented from osg::ProgramChunk. Definition at line 150 of file OSGFragmentProgramChunk.cpp. References SLOG. 00152 { 00153 SLOG << "Dump FragmentProgramChunk NI" << std::endl; 00154 }
|
|
|
Definition at line 111 of file OSGFragmentProgramChunk.cpp. References osg::beginEditCP(), osg::endEditCP(), osg::ProgramChunkBase::GLIdFieldMask, osg::GlobalSystemState, handleGL(), osg::osgTypedMethodVoidFunctor2ObjCPtrPtr(), osg::Window::registerGLObject(), osg::ProgramChunkBase::setGLId(), and osg::Startup. 00112 { 00113 if(GlobalSystemState == Startup) 00114 return; 00115 00116 // !!! this temporary is needed to work around compiler problems (sgi) 00117 // CHECK CHECK 00118 // FragmentProgramChunkPtr tmpPtr = FieldContainer::getPtr<ProgramChunkPtr>(*this); 00119 FragmentProgramChunkPtr tmpPtr(*this); 00120 00121 beginEditCP(tmpPtr, FragmentProgramChunk::GLIdFieldMask); 00122 00123 setGLId( 00124 Window::registerGLObject( 00125 osgTypedMethodVoidFunctor2ObjCPtrPtr<FragmentProgramChunkPtr, 00126 Window , 00127 UInt32>( 00128 tmpPtr, 00129 &FragmentProgramChunk::handleGL), 00130 1)); 00131 00132 endEditCP(tmpPtr, FragmentProgramChunk::GLIdFieldMask); 00133 }
|
|
|
Virtual helper function to let the derived chunks return the extension that they implement. Only if this extension is supproted on the current Window is the porgram called. Reimplemented from osg::ProgramChunk. Definition at line 166 of file OSGFragmentProgramChunk.cpp. References _arbFragmentProgram. 00167 { 00168 return _arbFragmentProgram; 00169 }
|
|
|
Virtual helper function to let the derived chunks return the target constant that they implement. Reimplemented from osg::ProgramChunk. Definition at line 171 of file OSGFragmentProgramChunk.cpp. References GL_FRAGMENT_PROGRAM_ARB. 00172 { 00173 return GL_FRAGMENT_PROGRAM_ARB; 00174 }
|
|
|
Virtual helper function to let the derived chunks return the name of the target constant that they implement, for debugging purposes. Reimplemented from osg::ProgramChunk. Definition at line 176 of file OSGFragmentProgramChunk.cpp.
|
|
|
Reimplemented from osg::ProgramChunk. Definition at line 79 of file OSGFragmentProgramChunk.cpp.
|
|
||||||||||||
|
GL object handler create the program and destroy it Definition at line 161 of file OSGFragmentProgramChunk.cpp. References _arbFragmentProgram, GL_FRAGMENT_PROGRAM_ARB, and osg::ProgramChunk::handleGL(). Referenced by onCreate(). 00162 { 00163 Inherited::handleGL(win, idstatus, GL_FRAGMENT_PROGRAM_ARB, _arbFragmentProgram); 00164 }
|
|
|
|
|
|
Reimplemented from osg::ProgramChunkBase. Definition at line 58 of file OSGFragmentProgramChunkBase.inl. References osg::FragmentProgramChunkBase::_type. Referenced by osg::FragmentProgramChunkBase::create(), and osg::RemoteAspect::RemoteAspect(). 00059 { 00060 return _type; 00061 }
|
|
|
Reimplemented from osg::ProgramChunkBase. Definition at line 65 of file OSGFragmentProgramChunkBase.inl. References osg::FragmentProgramChunkBase::_type, and osg::TypeBase::getId(). 00066 { 00067 return _type.getId(); 00068 }
|
|
|
Reimplemented from osg::ProgramChunkBase. Definition at line 86 of file OSGFragmentProgramChunkBase.cpp. References osg::FragmentProgramChunkBase::_type. 00087 { 00088 return _type; 00089 }
|
|
|
Reimplemented from osg::ProgramChunkBase. Definition at line 91 of file OSGFragmentProgramChunkBase.cpp. References osg::FragmentProgramChunkBase::_type. 00092 { 00093 return _type; 00094 }
|
|
|
Reimplemented from osg::ProgramChunkBase. Definition at line 106 of file OSGFragmentProgramChunkBase.cpp. 00107 { 00108 return sizeof(FragmentProgramChunk); 00109 }
|
|
|
Reimplemented from osg::ProgramChunkBase. Definition at line 166 of file OSGFragmentProgramChunkBase.cpp. References osg::ProgramChunkBase::getBinSize(). 00167 { 00168 UInt32 returnValue = Inherited::getBinSize(whichField); 00169 00170 00171 return returnValue; 00172 }
|
|
||||||||||||