OpenSceneGraph
3.0.1
|
Public Member Functions | |
ShaderAttribute () | |
ShaderAttribute (const ShaderAttribute &sa, const CopyOp ©op=CopyOp::SHALLOW_COPY) | |
Copy constructor using CopyOp to manage deep vs shallow copy. | |
virtual osg::Object * | cloneType () const |
Clone the type of an attribute, with Object* return type. | |
virtual osg::Object * | clone (const osg::CopyOp ©op) const |
Clone an attribute, with Object* return type. | |
virtual bool | isSameKindAs (const osg::Object *obj) const |
Return true if this and obj are of the same kind of object. | |
virtual const char * | libraryName () const |
Return the name of the attribute's library. | |
virtual const char * | className () const |
Return the name of the attribute's class type. | |
virtual int | compare (const StateAttribute &sa) const |
return -1 if *this < *rhs, 0 if *this==*rhs, 1 if *this>*rhs. | |
void | setType (Type type) |
virtual Type | getType () const |
Return the Type identifier of the attribute's class type. | |
unsigned int | addShader (Shader *shader) |
void | removeShader (unsigned int i) |
unsigned int | getNumShaders () const |
Shader * | getShader (unsigned int i) |
const Shader * | getShader (unsigned int i) const |
unsigned int | addUniform (Uniform *uniform) |
void | removeUniform (unsigned int i) |
unsigned int | getNumUniforms () const |
Uniform * | getUniform (unsigned int i) |
const Uniform * | getUniform (unsigned int i) const |
virtual bool | getModeUsage (StateAttribute::ModeUsage &usage) const |
Return the modes associated with this StateAttribute. | |
virtual void | apply (State &state) const |
apply the OpenGL state attributes. | |
virtual void | compileGLObjects (State &state) const |
Default to nothing to compile - all state is applied immediately. | |
virtual void | resizeGLObjectBuffers (unsigned int maxSize) |
Resize any per context GLObject buffers to specified size. | |
virtual void | releaseGLObjects (State *state=0) const |
Release OpenGL objects in specified graphics context if State object is passed, otherwise release OpenGL objects for all graphics context if State object pointer NULL. | |
Protected Types | |
typedef std::vector < osg::ref_ptr< osg::Uniform > > | Uniforms |
Protected Member Functions | |
virtual | ~ShaderAttribute () |
Protected Attributes | |
Type | _type |
Uniforms | _uniforms |
typedef std::vector< osg::ref_ptr<osg::Uniform> > osg::ShaderAttribute::Uniforms [protected] |
osg::ShaderAttribute::ShaderAttribute | ( | ) |
osg::ShaderAttribute::ShaderAttribute | ( | const ShaderAttribute & | sa, |
const CopyOp & | copyop = CopyOp::SHALLOW_COPY |
||
) |
Copy constructor using CopyOp to manage deep vs shallow copy.
virtual osg::ShaderAttribute::~ShaderAttribute | ( | ) | [protected, virtual] |
unsigned int osg::ShaderAttribute::addShader | ( | Shader * | shader | ) | [inline] |
unsigned int osg::ShaderAttribute::addUniform | ( | Uniform * | uniform | ) |
virtual void osg::ShaderAttribute::apply | ( | State & | ) | const [virtual] |
apply the OpenGL state attributes.
The render info for the current OpenGL context is passed in to allow the StateAttribute to obtain details on the the current context and state.
Reimplemented from osg::StateAttribute.
virtual const char* osg::ShaderAttribute::className | ( | ) | const [inline, virtual] |
Return the name of the attribute's class type.
Reimplemented from osg::StateAttribute.
virtual osg::Object* osg::ShaderAttribute::clone | ( | const osg::CopyOp & | ) | const [inline, virtual] |
Clone an attribute, with Object* return type.
Must be defined by derived classes.
Implements osg::StateAttribute.
virtual osg::Object* osg::ShaderAttribute::cloneType | ( | ) | const [virtual] |
Clone the type of an attribute, with Object* return type.
Must be defined by derived classes.
Implements osg::StateAttribute.
virtual int osg::ShaderAttribute::compare | ( | const StateAttribute & | sa | ) | const [virtual] |
return -1 if *this < *rhs, 0 if *this==*rhs, 1 if *this>*rhs.
Implements osg::StateAttribute.
virtual void osg::ShaderAttribute::compileGLObjects | ( | State & | ) | const [virtual] |
Default to nothing to compile - all state is applied immediately.
Reimplemented from osg::StateAttribute.
virtual bool osg::ShaderAttribute::getModeUsage | ( | StateAttribute::ModeUsage & | ) | const [virtual] |
Return the modes associated with this StateAttribute.
Reimplemented from osg::StateAttribute.
unsigned int osg::ShaderAttribute::getNumShaders | ( | ) | const [inline] |
unsigned int osg::ShaderAttribute::getNumUniforms | ( | ) | const [inline] |
Shader* osg::ShaderAttribute::getShader | ( | unsigned int | i | ) | [inline] |
const Shader* osg::ShaderAttribute::getShader | ( | unsigned int | i | ) | const [inline] |
virtual Type osg::ShaderAttribute::getType | ( | ) | const [inline, virtual] |
Return the Type identifier of the attribute's class type.
Implements osg::StateAttribute.
Uniform* osg::ShaderAttribute::getUniform | ( | unsigned int | i | ) | [inline] |
References osg::Uniform::get().
const Uniform* osg::ShaderAttribute::getUniform | ( | unsigned int | i | ) | const [inline] |
References osg::Uniform::get().
virtual bool osg::ShaderAttribute::isSameKindAs | ( | const osg::Object * | obj | ) | const [inline, virtual] |
Return true if this and obj are of the same kind of object.
Reimplemented from osg::StateAttribute.
References NULL.
virtual const char* osg::ShaderAttribute::libraryName | ( | ) | const [inline, virtual] |
Return the name of the attribute's library.
Reimplemented from osg::StateAttribute.
virtual void osg::ShaderAttribute::releaseGLObjects | ( | State * | = 0 | ) | const [virtual] |
Release OpenGL objects in specified graphics context if State object is passed, otherwise release OpenGL objects for all graphics context if State object pointer NULL.
Reimplemented from osg::StateAttribute.
void osg::ShaderAttribute::removeShader | ( | unsigned int | i | ) | [inline] |
void osg::ShaderAttribute::removeUniform | ( | unsigned int | i | ) |
virtual void osg::ShaderAttribute::resizeGLObjectBuffers | ( | unsigned int | ) | [virtual] |
Resize any per context GLObject buffers to specified size.
Reimplemented from osg::StateAttribute.
void osg::ShaderAttribute::setType | ( | Type | type | ) |
Type osg::ShaderAttribute::_type [protected] |
Uniforms osg::ShaderAttribute::_uniforms [protected] |
![]() | Generated at Mon Oct 3 2011 12:39:43 for the OpenSceneGraph by doxygen 1.7.5. |