Inheritance diagram for osgGL2::ShaderObject:
Public Types | |
enum | Type { VERTEX = GL_VERTEX_SHADER_ARB, FRAGMENT = GL_FRAGMENT_SHADER_ARB, UNKNOWN = -1 } |
Public Member Functions | |
ShaderObject () | |
ShaderObject (Type type) | |
ShaderObject (Type type, const char *sourceText) | |
ShaderObject (const ShaderObject &rhs, const osg::CopyOp ©op=osg::CopyOp::SHALLOW_COPY) | |
Copy constructor using CopyOp to manage deep vs shallow copy. | |
META_Object (osgGL2, ShaderObject) | |
int | compare (const ShaderObject &sa) const |
void | setShaderSource (const char *sourceText) |
Load the ShaderObject's source code text from a string. | |
const std::string & | getShaderSource () const |
Retreive the source code text. | |
bool | loadShaderSourceFromFile (const char *fileName) |
Load the ShaderObject's source code text from a file. | |
Type | getType () const |
Get the ShaderObject type as an enum. | |
const char * | getTypename () const |
Get the ShaderObject type as a descriptive string. | |
void | dirtyShaderObject () |
Mark us as "dirty" and in need of recompilation. | |
void | build (unsigned int contextID) const |
Perform a recompilation of all our PCSOs. | |
void | attach (unsigned int contextID, GLhandleARB progObj) const |
For a given GL context, attach a glShaderObject to a glProgramObject. | |
Protected Member Functions | |
virtual | ~ShaderObject () |
PerContextShaderObj * | getPCSO (unsigned int contextID) const |
void | addProgObjRef (ProgramObject *progObj) |
Protected Attributes | |
Type | _type |
std::string | _shaderSource |
std::vector< ProgramObjectPtr > | _programObjectList |
osg::buffered_value< osg::ref_ptr< PerContextShaderObj > > | _pcsoList |
Friends | |
void | ProgramObject::addShader (ShaderObject *shadObj) |
Classes | |
class | PerContextShaderObj |
PCSO is an OSG-internal encapsulation of glShaderObjects per-GL context. More... |
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.
|
|
|
|
|
|
|
|
|
Copy constructor using CopyOp to manage deep vs shallow copy.
|
|
|
|
|
|
For a given GL context, attach a glShaderObject to a glProgramObject.
|
|
Perform a recompilation of all our PCSOs.
|
|
|
|
Mark us as "dirty" and in need of recompilation.
|
|
|
|
Retreive the source code text.
|
|
Get the ShaderObject type as an enum.
|
|
Get the ShaderObject type as a descriptive string.
|
|
Load the ShaderObject's source code text from a file.
|
|
|
|
Load the ShaderObject's source code text from a string.
|
|
|
|
|
|
|
|
|
|
|