|
Public Types |
| typedef std::vector< StateSet * > | ParentList |
| enum | Type {
FLOAT = GL_FLOAT,
FLOAT_VEC2 = GL_FLOAT_VEC2,
FLOAT_VEC3 = GL_FLOAT_VEC3,
FLOAT_VEC4 = GL_FLOAT_VEC4,
INT = GL_INT,
INT_VEC2 = GL_INT_VEC2,
INT_VEC3 = GL_INT_VEC3,
INT_VEC4 = GL_INT_VEC4,
BOOL = GL_BOOL,
BOOL_VEC2 = GL_BOOL_VEC2,
BOOL_VEC3 = GL_BOOL_VEC3,
BOOL_VEC4 = GL_BOOL_VEC4,
FLOAT_MAT2 = GL_FLOAT_MAT2,
FLOAT_MAT3 = GL_FLOAT_MAT3,
FLOAT_MAT4 = GL_FLOAT_MAT4,
SAMPLER_1D = GL_SAMPLER_1D,
SAMPLER_2D = GL_SAMPLER_2D,
SAMPLER_3D = GL_SAMPLER_3D,
SAMPLER_CUBE = GL_SAMPLER_CUBE,
SAMPLER_1D_SHADOW = GL_SAMPLER_1D_SHADOW,
SAMPLER_2D_SHADOW = GL_SAMPLER_2D_SHADOW,
UNDEFINED = 0x0
} |
Public Member Functions |
| | Uniform () |
| | Uniform (Type type, const std::string &name, int numElements=1) |
| | Uniform (const Uniform &rhs, const CopyOp ©op=CopyOp::SHALLOW_COPY) |
| | META_Object (osg, Uniform) |
| bool | setType (Type t) |
| const Type | getType () const |
| void | setName (const std::string &name) |
| void | setNumElements (unsigned int numElements) |
| unsigned int | getNumElements () const |
| unsigned int | getInternalArrayNumElements () const |
| | Uniform (const char *name, float f) |
| | Uniform (const char *name, int i) |
| | Uniform (const char *name, bool b) |
| | Uniform (const char *name, const osg::Vec2 &v2) |
| | Uniform (const char *name, const osg::Vec3 &v3) |
| | Uniform (const char *name, const osg::Vec4 &v4) |
| | Uniform (const char *name, const osg::Matrix2 &m2) |
| | Uniform (const char *name, const osg::Matrix3 &m3) |
| | Uniform (const char *name, const osg::Matrixf &m4) |
| | Uniform (const char *name, const osg::Matrixd &m4) |
| | Uniform (const char *name, int i0, int i1) |
| | Uniform (const char *name, int i0, int i1, int i2) |
| | Uniform (const char *name, int i0, int i1, int i2, int i3) |
| | Uniform (const char *name, bool b0, bool b1) |
| | Uniform (const char *name, bool b0, bool b1, bool b2) |
| | Uniform (const char *name, bool b0, bool b1, bool b2, bool b3) |
| virtual int | compare (const Uniform &rhs) const |
| virtual int | compareData (const Uniform &rhs) const |
| bool | operator< (const Uniform &rhs) const |
| bool | operator== (const Uniform &rhs) const |
| bool | operator!= (const Uniform &rhs) const |
| void | copyData (const Uniform &rhs) |
| const ParentList & | getParents () const |
| ParentList | getParents () |
| StateSet * | getParent (unsigned int i) |
| const StateSet * | getParent (unsigned int i) const |
| unsigned int | getNumParents () const |
| bool | set (float f) |
| bool | set (int i) |
| bool | set (bool b) |
| bool | set (const osg::Vec2 &v2) |
| bool | set (const osg::Vec3 &v3) |
| bool | set (const osg::Vec4 &v4) |
| bool | set (const osg::Matrix2 &m2) |
| bool | set (const osg::Matrix3 &m3) |
| bool | set (const osg::Matrixf &m4) |
| bool | set (const osg::Matrixd &m4) |
| bool | set (int i0, int i1) |
| bool | set (int i0, int i1, int i2) |
| bool | set (int i0, int i1, int i2, int i3) |
| bool | set (bool b0, bool b1) |
| bool | set (bool b0, bool b1, bool b2) |
| bool | set (bool b0, bool b1, bool b2, bool b3) |
| bool | get (float &f) const |
| bool | get (int &i) const |
| bool | get (bool &b) const |
| bool | get (osg::Vec2 &v2) const |
| bool | get (osg::Vec3 &v3) const |
| bool | get (osg::Vec4 &v4) const |
| bool | get (osg::Matrix2 &m2) const |
| bool | get (osg::Matrix3 &m3) const |
| bool | get (osg::Matrixf &m4) const |
| bool | get (osg::Matrixd &m4) const |
| bool | get (int &i0, int &i1) const |
| bool | get (int &i0, int &i1, int &i2) const |
| bool | get (int &i0, int &i1, int &i2, int &i3) const |
| bool | get (bool &b0, bool &b1) const |
| bool | get (bool &b0, bool &b1, bool &b2) const |
| bool | get (bool &b0, bool &b1, bool &b2, bool &b3) const |
| bool | setElement (unsigned int index, float f) |
| bool | setElement (unsigned int index, int i) |
| bool | setElement (unsigned int index, bool b) |
| bool | setElement (unsigned int index, const osg::Vec2 &v2) |
| bool | setElement (unsigned int index, const osg::Vec3 &v3) |
| bool | setElement (unsigned int index, const osg::Vec4 &v4) |
| bool | setElement (unsigned int index, const osg::Matrix2 &m2) |
| bool | setElement (unsigned int index, const osg::Matrix3 &m3) |
| bool | setElement (unsigned int index, const osg::Matrixf &m4) |
| bool | setElement (unsigned int index, const osg::Matrixd &m4) |
| bool | setElement (unsigned int index, int i0, int i1) |
| bool | setElement (unsigned int index, int i0, int i1, int i2) |
| bool | setElement (unsigned int index, int i0, int i1, int i2, int i3) |
| bool | setElement (unsigned int index, bool b0, bool b1) |
| bool | setElement (unsigned int index, bool b0, bool b1, bool b2) |
| bool | setElement (unsigned int index, bool b0, bool b1, bool b2, bool b3) |
| bool | getElement (unsigned int index, float &f) const |
| bool | getElement (unsigned int index, int &i) const |
| bool | getElement (unsigned int index, bool &b) const |
| bool | getElement (unsigned int index, osg::Vec2 &v2) const |
| bool | getElement (unsigned int index, osg::Vec3 &v3) const |
| bool | getElement (unsigned int index, osg::Vec4 &v4) const |
| bool | getElement (unsigned int index, osg::Matrix2 &m2) const |
| bool | getElement (unsigned int index, osg::Matrix3 &m3) const |
| bool | getElement (unsigned int index, osg::Matrixf &m4) const |
| bool | getElement (unsigned int index, osg::Matrixd &m4) const |
| bool | getElement (unsigned int index, int &i0, int &i1) const |
| bool | getElement (unsigned int index, int &i0, int &i1, int &i2) const |
| bool | getElement (unsigned int index, int &i0, int &i1, int &i2, int &i3) const |
| bool | getElement (unsigned int index, bool &b0, bool &b1) const |
| bool | getElement (unsigned int index, bool &b0, bool &b1, bool &b2) const |
| bool | getElement (unsigned int index, bool &b0, bool &b1, bool &b2, bool &b3) const |
| void | setUpdateCallback (Callback *uc) |
| Callback * | getUpdateCallback () |
| const Callback * | getUpdateCallback () const |
| void | setEventCallback (Callback *ec) |
| Callback * | getEventCallback () |
| const Callback * | getEventCallback () const |
| void | dirty () |
| bool | setArray (FloatArray *array) |
| bool | setArray (IntArray *array) |
| FloatArray * | getFloatArray () |
| const FloatArray * | getFloatArray () const |
| IntArray * | getIntArray () |
| const IntArray * | getIntArray () const |
| void | setModifiedCount (unsigned int mc) |
| unsigned int | getModifiedCount () const |
| void | apply (const GL2Extensions *ext, GLint location) const |
Static Public Member Functions |
| static const char * | getTypename (Type t) |
| static int | getTypeNumComponents (Type t) |
| static Uniform::Type | getTypeId (const std::string &tname) |
| static Type | getGlApiType (Type t) |
| static GLenum | getInternalArrayType (Type t) |
Protected Member Functions |
| virtual | ~Uniform () |
| Uniform & | operator= (const Uniform &) |
| bool | isCompatibleType (Type t) const |
| bool | isScalar () const |
| void | allocateDataArray () |
| void | addParent (osg::StateSet *object) |
| void | removeParent (osg::StateSet *object) |
Protected Attributes |
| ParentList | _parents |
| Type | _type |
| unsigned int | _numElements |
| ref_ptr< FloatArray > | _floatArray |
| ref_ptr< IntArray > | _intArray |
| ref_ptr< Callback > | _updateCallback |
| ref_ptr< Callback > | _eventCallback |
| unsigned int | _modifiedCount |
Friends |
| class | osg::StateSet |
Classes |
| struct | Callback |