2003-07-23 19:27:31 +08:00
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
< HTML >
< HEAD >
< TITLE > class OSGGL2_EXPORT osgGL2::ShaderObject< / TITLE >
2004-08-06 14:53:36 +08:00
< META NAME = "GENERATOR" CONTENT = "DOC++ 3.4.6" >
2003-07-23 19:27:31 +08:00
< / HEAD >
< BODY BGCOLOR = "#ffffff" >
2004-08-06 14:53:36 +08:00
< H2 > class OSGGL2_EXPORT < A HREF = "#DOC.DOCU" > osgGL2::ShaderObject< / A > < / H2 > < / H2 > < BLOCKQUOTE > osgGL2::ShaderObject is an application-level abstraction of the OpenGL Shading Language glShaderObject.< / BLOCKQUOTE >
2003-07-23 19:27:31 +08:00
< HR >
< H2 > Inheritance:< / H2 >
< APPLET CODE = "ClassGraph.class" WIDTH = 600 HEIGHT = 65 >
< param name = classes value = "Mosg::Object,M,CShaderObject,MShaderObject.html" >
< param name = before value = "M,M" >
< param name = after value = "Md_,M" >
< param name = indent value = "0,1" >
< param name = arrowdir value = "down" >
< / APPLET >
< HR >
< DL >
2004-08-06 14:53:36 +08:00
< P > < DL >
< DT > < H3 > Public Classes< / H3 > < DD > < DT >
< IMG ALT = "[more]" BORDER = 0 SRC = icon1.gif > enum < B > < A HREF = "#DOC.67.5.1" > Type< / A > < / B >
< / DL > < / P >
2003-07-23 19:27:31 +08:00
< P > < DL >
< DT > < H3 > Public Methods< / H3 > < DD > < DT >
2004-08-06 14:53:36 +08:00
< IMG ALT = "[more]" BORDER = 0 SRC = icon1.gif > < B > < A HREF = "#DOC.67.5.2" > ShaderObject< / A > < / B > ()
2003-07-23 19:27:31 +08:00
< DT >
2004-08-06 14:53:36 +08:00
< IMG ALT = "[more]" BORDER = 0 SRC = icon1.gif > < B > < A HREF = "#DOC.67.5.3" > ShaderObject< / A > < / B > (<!1> < A HREF = "ShaderObject.html#DOC.67.5.1" > Type< / A > type)
2003-07-23 19:27:31 +08:00
< DT >
2004-08-06 14:53:36 +08:00
< IMG ALT = "[more]" BORDER = 0 SRC = icon1.gif > < B > < A HREF = "#DOC.67.5.4" > ShaderObject< / A > < / B > (<!1> < A HREF = "ShaderObject.html#DOC.67.5.1" > Type< / A > type, const char* sourceText)
2003-07-23 19:27:31 +08:00
< DT >
2004-08-06 14:53:36 +08:00
< IMG ALT = "[more]" BORDER = 0 SRC = icon1.gif > < B > < A HREF = "#DOC.67.5.5" > ShaderObject< / A > < / B > (const <!1> < A HREF = "ShaderObject.html#DOC.67.5.5" > ShaderObject< / A > & rhs, const osg::CopyOp& copyop=osg::CopyOp::SHALLOW_COPY)
2003-07-23 19:27:31 +08:00
< DD > < I > Copy constructor using CopyOp to manage deep vs shallow copy< / I >
< DT >
2004-08-06 14:53:36 +08:00
< IMG ALT = "[more]" BORDER = 0 SRC = icon1.gif > < B > < A HREF = "#DOC.67.5.6" > META_Object< / A > < / B > (<!1> < A HREF = "osgGL2.html" > osgGL2< / A > , <!1> < A HREF = "ShaderObject.html" > ShaderObject< / A > )
2003-07-23 19:27:31 +08:00
< DT >
2004-08-06 14:53:36 +08:00
< IMG ALT = "[more]" BORDER = 0 SRC = icon1.gif > int < B > < A HREF = "#DOC.67.5.7" > compare< / A > < / B > (const <!1> < A HREF = "ShaderObject.html" > ShaderObject< / A > & sa) const
2003-07-23 19:27:31 +08:00
< DT >
2004-08-06 14:53:36 +08:00
< IMG ALT = "[more]" BORDER = 0 SRC = icon1.gif > void < B > < A HREF = "#DOC.67.5.8" > setShaderSource< / A > < / B > ( const char* sourceText )
< DD > < I > Load the ShaderObject's source code text from a string.< / I >
2003-07-23 19:27:31 +08:00
< DT >
2004-08-06 14:53:36 +08:00
< IMG ALT = "[more]" BORDER = 0 SRC = icon1.gif > inline const std::string& < B > < A HREF = "#DOC.67.5.9" > getShaderSource< / A > < / B > () const
< DD > < I > Retreive the source code text < / I >
2003-07-23 19:27:31 +08:00
< DT >
2004-08-06 14:53:36 +08:00
< IMG ALT = "[more]" BORDER = 0 SRC = icon1.gif > bool < B > < A HREF = "#DOC.67.5.10" > loadShaderSourceFromFile< / A > < / B > ( const char* fileName )
< DD > < I > Load the ShaderObject's source code text from a file.< / I >
2003-07-23 19:27:31 +08:00
< DT >
2004-08-06 14:53:36 +08:00
< IMG ALT = "[more]" BORDER = 0 SRC = icon1.gif > inline <!1> < A HREF = "ShaderObject.html#DOC.67.5.1" > Type< / A > < B > < A HREF = "#DOC.67.5.11" > getType< / A > < / B > () const
< DD > < I > Get the ShaderObject type as an enum.< / I >
2003-07-23 19:27:31 +08:00
< DT >
2004-08-06 14:53:36 +08:00
< IMG ALT = "[more]" BORDER = 0 SRC = icon1.gif > const char* < B > < A HREF = "#DOC.67.5.12" > getTypename< / A > < / B > () const
< DD > < I > Get the ShaderObject type as a descriptive string.< / I >
2003-07-23 19:27:31 +08:00
< DT >
2004-08-06 14:53:36 +08:00
< IMG ALT = "[more]" BORDER = 0 SRC = icon1.gif > void < B > < A HREF = "#DOC.67.5.13" > dirtyShaderObject< / A > < / B > ()
< DD > < I > Mark us as "dirty" and in need of recompilation < / I >
< DT >
< IMG ALT = "[more]" BORDER = 0 SRC = icon1.gif > void < B > < A HREF = "#DOC.67.5.14" > build< / A > < / B > (unsigned int contextID) const
< DD > < I > Perform a recompilation of all our PCSOs < / I >
< DT >
< IMG ALT = "[more]" BORDER = 0 SRC = icon1.gif > void < B > < A HREF = "#DOC.67.5.15" > attach< / A > < / B > (unsigned int contextID, GLhandleARB progObj) const
< DD > < I > For a given GL context, attach a glShaderObject to a glProgramObject < / I >
2003-07-23 19:27:31 +08:00
< / DL > < / P >
< P > < DL >
2004-08-06 14:53:36 +08:00
< DT > < H3 > Protected Classes< / H3 > < DD > < DT >
class < B > < A HREF = "PerContextShaderObj.html" > PerContextShaderObj< / A > < / B > : public osg::Referenced
< DD > < I > PCSO is an OSG-internal encapsulation of glShaderObjects per-GL context.< / I >
2003-07-23 19:27:31 +08:00
< / DL > < / P >
< P > < DL >
< DT > < H3 > Protected Fields< / H3 > < DD > < DT >
2004-08-06 14:53:36 +08:00
< IMG ALT = "[more]" BORDER = 0 SRC = icon1.gif > <!1> < A HREF = "ShaderObject.html#DOC.67.5.1" > Type< / A > < B > < A HREF = "#DOC.67.5.20" > _type< / A > < / B >
< DT >
< IMG ALT = "[more]" BORDER = 0 SRC = icon1.gif > std::string < B > < A HREF = "#DOC.67.5.21" > _shaderSource< / A > < / B >
2003-07-23 19:27:31 +08:00
< DT >
2004-08-06 14:53:36 +08:00
< IMG ALT = "[more]" BORDER = 0 SRC = icon1.gif > std::vector< <!1> < A HREF = "osgGL2.html#DOC.67.2" > ProgramObjectPtr< / A > > < B > < A HREF = "#DOC.67.5.22" > _programObjectList< / A > < / B >
2003-07-23 19:27:31 +08:00
< DT >
2004-08-06 14:53:36 +08:00
< IMG ALT = "[more]" BORDER = 0 SRC = icon1.gif > mutable osg::buffered_value< osg::ref_ptr< <!1> < A HREF = "PerContextShaderObj.html" > PerContextShaderObj< / A > > > < B > < A HREF = "#DOC.67.5.23" > _pcsoList< / A > < / B >
2003-07-23 19:27:31 +08:00
< / DL > < / P >
< P > < DL >
< DT > < H3 > Protected Methods< / H3 > < DD > < DT >
2004-08-06 14:53:36 +08:00
< IMG ALT = "[more]" BORDER = 0 SRC = icon1.gif > virtual < B > < A HREF = "#DOC.67.5.17" > ~ShaderObject< / A > < / B > ()
2003-07-23 19:27:31 +08:00
< DT >
2004-08-06 14:53:36 +08:00
< IMG ALT = "[more]" BORDER = 0 SRC = icon1.gif > <!1> < A HREF = "PerContextShaderObj.html" > PerContextShaderObj< / A > * < B > < A HREF = "#DOC.67.5.18" > getPCSO< / A > < / B > (unsigned int contextID) const
2003-07-23 19:27:31 +08:00
< DT >
2004-08-06 14:53:36 +08:00
< IMG ALT = "[more]" BORDER = 0 SRC = icon1.gif > void < B > < A HREF = "#DOC.67.5.19" > addProgObjRef< / A > < / B > ( <!1> < A HREF = "ProgramObject.html" > ProgramObject< / A > * progObj )
2003-07-23 19:27:31 +08:00
< / DL > < / P >
< / DL >
< A NAME = "DOC.DOCU" > < / A >
< HR >
< H2 > Documentation< / H2 >
2004-08-06 14:53:36 +08:00
< BLOCKQUOTE > osgGL2::ShaderObject is an application-level abstraction of the OpenGL Shading Language glShaderObject.
It is a container to load the shader source code text and manage its
compilation.
A ShaderObject may be attached to more than one osgGL2::ProgramObject.
ShaderObject will automatically manage per-context instancing of the
internal objects, if that is necessary for a particular display
configuration.< / BLOCKQUOTE >
2003-07-23 19:27:31 +08:00
< DL >
< A NAME = "Type" > < / A >
2004-08-06 14:53:36 +08:00
< A NAME = "DOC.67.5.1" > < / A >
2003-07-23 19:27:31 +08:00
< DT > < IMG ALT = "o" BORDER = 0 SRC = icon2.gif > < TT > < B > enum Type< / B > < / TT >
< DL > < DT > < DD > < / DL > < P > < DL >
< A NAME = "VERTEX" > < / A >
2004-08-06 14:53:36 +08:00
< A NAME = "DOC.67.5.1.1" > < / A >
2003-07-23 19:27:31 +08:00
< DT > < IMG ALT = "o" BORDER = 0 SRC = icon2.gif > < TT > < B > VERTEX< / B > < / TT >
< DL > < DT > < DD > < / DL > < P >
< A NAME = "FRAGMENT" > < / A >
2004-08-06 14:53:36 +08:00
< A NAME = "DOC.67.5.1.2" > < / A >
2003-07-23 19:27:31 +08:00
< DT > < IMG ALT = "o" BORDER = 0 SRC = icon2.gif > < TT > < B > FRAGMENT< / B > < / TT >
< DL > < DT > < DD > < / DL > < P >
< A NAME = "UNKNOWN" > < / A >
2004-08-06 14:53:36 +08:00
< A NAME = "DOC.67.5.1.3" > < / A >
2003-07-23 19:27:31 +08:00
< DT > < IMG ALT = "o" BORDER = 0 SRC = icon2.gif > < TT > < B > UNKNOWN< / B > < / TT >
< DL > < DT > < DD > < / DL > < P > < / DL >
< A NAME = "ShaderObject" > < / A >
2004-08-06 14:53:36 +08:00
< A NAME = "DOC.67.5.2" > < / A >
2003-07-23 19:27:31 +08:00
< DT > < IMG ALT = "o" BORDER = 0 SRC = icon2.gif > < TT > < B > ShaderObject()< / B > < / TT >
< DL > < DT > < DD > < / DL > < P >
< A NAME = "ShaderObject" > < / A >
2004-08-06 14:53:36 +08:00
< A NAME = "DOC.67.5.3" > < / A >
< DT > < IMG ALT = "o" BORDER = 0 SRC = icon2.gif > < TT > < B > ShaderObject(<!1> < A HREF = "ShaderObject.html#DOC.67.5.1" > Type< / A > type)< / B > < / TT >
2003-07-23 19:27:31 +08:00
< DL > < DT > < DD > < / DL > < P >
< A NAME = "ShaderObject" > < / A >
2004-08-06 14:53:36 +08:00
< A NAME = "DOC.67.5.4" > < / A >
< DT > < IMG ALT = "o" BORDER = 0 SRC = icon2.gif > < TT > < B > ShaderObject(<!1> < A HREF = "ShaderObject.html#DOC.67.5.1" > Type< / A > type, const char* sourceText)< / B > < / TT >
2003-07-23 19:27:31 +08:00
< DL > < DT > < DD > < / DL > < P >
< A NAME = "ShaderObject" > < / A >
2004-08-06 14:53:36 +08:00
< A NAME = "DOC.67.5.5" > < / A >
< DT > < IMG ALT = "o" BORDER = 0 SRC = icon2.gif > < TT > < B > ShaderObject(const <!1> < A HREF = "ShaderObject.html#DOC.67.5.5" > ShaderObject< / A > & rhs, const osg::CopyOp& copyop=osg::CopyOp::SHALLOW_COPY)< / B > < / TT >
2003-07-23 19:27:31 +08:00
< DD > Copy constructor using CopyOp to manage deep vs shallow copy
< DL > < DT > < DD > < / DL > < P >
< A NAME = "META_Object" > < / A >
2004-08-06 14:53:36 +08:00
< A NAME = "DOC.67.5.6" > < / A >
2003-07-23 19:27:31 +08:00
< DT > < IMG ALT = "o" BORDER = 0 SRC = icon2.gif > < TT > < B > META_Object(<!1> < A HREF = "osgGL2.html" > osgGL2< / A > , <!1> < A HREF = "ShaderObject.html" > ShaderObject< / A > )< / B > < / TT >
< DL > < DT > < DD > < / DL > < P >
2004-08-06 14:53:36 +08:00
< A NAME = "compare" > < / A >
< A NAME = "DOC.67.5.7" > < / A >
< DT > < IMG ALT = "o" BORDER = 0 SRC = icon2.gif > < TT > < B > int compare(const <!1> < A HREF = "ShaderObject.html" > ShaderObject< / A > & sa) const < / B > < / TT >
< DL > < DT > < DD > < / DL > < P >
2003-07-23 19:27:31 +08:00
< A NAME = "setShaderSource" > < / A >
2004-08-06 14:53:36 +08:00
< A NAME = "DOC.67.5.8" > < / A >
2003-07-23 19:27:31 +08:00
< DT > < IMG ALT = "o" BORDER = 0 SRC = icon2.gif > < TT > < B > void setShaderSource( const char* sourceText )< / B > < / TT >
2004-08-06 14:53:36 +08:00
< DD > Load the ShaderObject's source code text from a string.
2003-07-23 19:27:31 +08:00
< DL > < DT > < DD > < / DL > < P >
< A NAME = "getShaderSource" > < / A >
2004-08-06 14:53:36 +08:00
< A NAME = "DOC.67.5.9" > < / A >
2003-07-23 19:27:31 +08:00
< DT > < IMG ALT = "o" BORDER = 0 SRC = icon2.gif > < TT > < B > inline const std::string& getShaderSource() const < / B > < / TT >
2004-08-06 14:53:36 +08:00
< DD > Retreive the source code text
2003-07-23 19:27:31 +08:00
< DL > < DT > < DD > < / DL > < P >
< A NAME = "loadShaderSourceFromFile" > < / A >
2004-08-06 14:53:36 +08:00
< A NAME = "DOC.67.5.10" > < / A >
2003-07-23 19:27:31 +08:00
< DT > < IMG ALT = "o" BORDER = 0 SRC = icon2.gif > < TT > < B > bool loadShaderSourceFromFile( const char* fileName )< / B > < / TT >
2004-08-06 14:53:36 +08:00
< DD > Load the ShaderObject's source code text from a file.
2003-07-23 19:27:31 +08:00
< DL > < DT > < DD > < / DL > < P >
< A NAME = "getType" > < / A >
2004-08-06 14:53:36 +08:00
< A NAME = "DOC.67.5.11" > < / A >
< DT > < IMG ALT = "o" BORDER = 0 SRC = icon2.gif > < TT > < B > inline <!1> < A HREF = "ShaderObject.html#DOC.67.5.1" > Type< / A > getType() const < / B > < / TT >
< DD > Get the ShaderObject type as an enum.
< DL > < DT > < DD > < / DL > < P >
< A NAME = "getTypename" > < / A >
< A NAME = "DOC.67.5.12" > < / A >
< DT > < IMG ALT = "o" BORDER = 0 SRC = icon2.gif > < TT > < B > const char* getTypename() const < / B > < / TT >
< DD > Get the ShaderObject type as a descriptive string.
2003-07-23 19:27:31 +08:00
< DL > < DT > < DD > < / DL > < P >
< A NAME = "dirtyShaderObject" > < / A >
2004-08-06 14:53:36 +08:00
< A NAME = "DOC.67.5.13" > < / A >
2003-07-23 19:27:31 +08:00
< DT > < IMG ALT = "o" BORDER = 0 SRC = icon2.gif > < TT > < B > void dirtyShaderObject()< / B > < / TT >
2004-08-06 14:53:36 +08:00
< DD > Mark us as "dirty" and in need of recompilation
2003-07-23 19:27:31 +08:00
< DL > < DT > < DD > < / DL > < P >
< A NAME = "build" > < / A >
2004-08-06 14:53:36 +08:00
< A NAME = "DOC.67.5.14" > < / A >
< DT > < IMG ALT = "o" BORDER = 0 SRC = icon2.gif > < TT > < B > void build(unsigned int contextID) const < / B > < / TT >
< DD > Perform a recompilation of all our PCSOs
2003-07-23 19:27:31 +08:00
< DL > < DT > < DD > < / DL > < P >
< A NAME = "attach" > < / A >
2004-08-06 14:53:36 +08:00
< A NAME = "DOC.67.5.15" > < / A >
2003-07-23 19:27:31 +08:00
< DT > < IMG ALT = "o" BORDER = 0 SRC = icon2.gif > < TT > < B > void attach(unsigned int contextID, GLhandleARB progObj) const < / B > < / TT >
2004-08-06 14:53:36 +08:00
< DD > For a given GL context, attach a glShaderObject to a glProgramObject
2003-07-23 19:27:31 +08:00
< DL > < DT > < DD > < / DL > < P >
< A NAME = "~ShaderObject" > < / A >
2004-08-06 14:53:36 +08:00
< A NAME = "DOC.67.5.17" > < / A >
2003-07-23 19:27:31 +08:00
< DT > < IMG ALT = "o" BORDER = 0 SRC = icon2.gif > < TT > < B > virtual ~ShaderObject()< / B > < / TT >
< DL > < DT > < DD > < / DL > < P >
2004-08-06 14:53:36 +08:00
< A NAME = "getPCSO" > < / A >
< A NAME = "DOC.67.5.18" > < / A >
< DT > < IMG ALT = "o" BORDER = 0 SRC = icon2.gif > < TT > < B > <!1> < A HREF = "PerContextShaderObj.html" > PerContextShaderObj< / A > * getPCSO(unsigned int contextID) const < / B > < / TT >
< DL > < DT > < DD > < / DL > < P >
< A NAME = "addProgObjRef" > < / A >
< A NAME = "DOC.67.5.19" > < / A >
< DT > < IMG ALT = "o" BORDER = 0 SRC = icon2.gif > < TT > < B > void addProgObjRef( <!1> < A HREF = "ProgramObject.html" > ProgramObject< / A > * progObj )< / B > < / TT >
2003-07-23 19:27:31 +08:00
< DL > < DT > < DD > < / DL > < P >
< A NAME = "_type" > < / A >
2004-08-06 14:53:36 +08:00
< A NAME = "DOC.67.5.20" > < / A >
< DT > < IMG ALT = "o" BORDER = 0 SRC = icon2.gif > < TT > < B > <!1> < A HREF = "ShaderObject.html#DOC.67.5.1" > Type< / A > _type< / B > < / TT >
2003-07-23 19:27:31 +08:00
< DL > < DT > < DD > < / DL > < P >
2004-08-06 14:53:36 +08:00
< A NAME = "_shaderSource" > < / A >
< A NAME = "DOC.67.5.21" > < / A >
< DT > < IMG ALT = "o" BORDER = 0 SRC = icon2.gif > < TT > < B > std::string _shaderSource< / B > < / TT >
2003-07-23 19:27:31 +08:00
< DL > < DT > < DD > < / DL > < P >
2004-08-06 14:53:36 +08:00
< A NAME = "_programObjectList" > < / A >
< A NAME = "DOC.67.5.22" > < / A >
< DT > < IMG ALT = "o" BORDER = 0 SRC = icon2.gif > < TT > < B > std::vector< <!1> < A HREF = "osgGL2.html#DOC.67.2" > ProgramObjectPtr< / A > > _programObjectList< / B > < / TT >
2003-07-23 19:27:31 +08:00
< DL > < DT > < DD > < / DL > < P >
2004-08-06 14:53:36 +08:00
< A NAME = "_pcsoList" > < / A >
< A NAME = "DOC.67.5.23" > < / A >
< DT > < IMG ALT = "o" BORDER = 0 SRC = icon2.gif > < TT > < B > mutable osg::buffered_value< osg::ref_ptr< <!1> < A HREF = "PerContextShaderObj.html" > PerContextShaderObj< / A > > > _pcsoList< / B > < / TT >
2003-07-23 19:27:31 +08:00
< DL > < DT > < DD > < / DL > < P > < / DL >
< HR > < DL > < DT > < B > This class has no child classes.< / B > < / DL >
2004-08-06 14:53:36 +08:00
< DL > < DT > < DT > < B > Friends:< / B > < DD > void ProgramObject::addShader( <!1> < A HREF = "ShaderObject.html" > ShaderObject< / A > * shadObj )< BR > < DD > < / DL > < P > < P > < I > < A HREF = "index.html" > Alphabetic index< / A > < / I > < I > < A HREF = "HIER.html" > HTML hierarchy of classes< / A > or < A HREF = "HIERjava.html" > Java< / A > < / I > < / P > < HR >
2003-07-23 19:27:31 +08:00
< BR >
2004-08-06 14:53:36 +08:00
This page was generated with the help of < A HREF = "http://www.linuxsupportline.com/~doc++" > DOC++< / A > .
2003-07-23 19:27:31 +08:00
< / BODY >
< / HTML >