## class OSGGL2_EXPORT osgGL2::ShaderObject

> Encapsulates the OpenGL Shading Language ShaderObject

## Inheritance:

### Public Methods

ShaderObject()
ShaderObject(Type type)
ShaderObject(Type type, const char* sourceText)
ShaderObject(const ShaderObject& rhs, const osg::CopyOp& copyop=osg::CopyOp::SHALLOW_COPY)
  Copy constructor using CopyOp to manage deep vs shallow copy
META_Object(osgGL2, ShaderObject)
void setShaderSource( const char* sourceText )
inline const std::string& getShaderSource() const
bool loadShaderSourceFromFile( const char* fileName )
Type getType() const
void dirtyShaderObject()
  Force a recompile on next apply() of associated glShaderObject.
bool build(unsigned int contextID) const
void attach(unsigned int contextID, GLhandleARB progObj) const

### Public Members

enum Type

### Protected Fields

std::string _shaderSource
Type _type
mutable PCSOList _pcsoList

### Protected Methods

virtual ~ShaderObject()
PerContextShaderObj* getPCSO(unsigned int contextID) const

### Protected Members

class OSGGL2_EXPORT PerContextShaderObj: public osg::Referenced
typedef osg::buffered_value< osg::ref_ptr<PerContextShaderObj> > PCSOList

## Documentation

> Encapsulates the OpenGL Shading Language ShaderObject

`enum Type`

`VERTEX`

`FRAGMENT`

`UNKNOWN`

`ShaderObject()`

`ShaderObject(Type type)`

`ShaderObject(Type type, const char* sourceText)`

`ShaderObject(const ShaderObject& rhs, const osg::CopyOp& copyop=osg::CopyOp::SHALLOW_COPY)`
  Copy constructor using CopyOp to manage deep vs shallow copy

`META_Object(osgGL2, ShaderObject)`

`void setShaderSource( const char* sourceText )`

`inline const std::string& getShaderSource() const`

`bool loadShaderSourceFromFile( const char* fileName )`

`Type getType() const`

`void dirtyShaderObject()`
  Force a recompile on next apply() of associated glShaderObject.

`bool build(unsigned int contextID) const`

`void attach(unsigned int contextID, GLhandleARB progObj) const`

`virtual ~ShaderObject()`

`std::string _shaderSource`

`Type _type`

`typedef osg::buffered_value< osg::ref_ptr<PerContextShaderObj> > PCSOList`

`mutable PCSOList _pcsoList`

`PerContextShaderObj* getPCSO(unsigned int contextID) const`

This class has no child classes.

Alphabetic index HTML hierarchy of classes or Java

This page was generated with the help of DOC++.