openscenegraph
|
Classes | |
struct | Callback |
Public Types | |
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, SAMPLER_1D_ARRAY = GL_SAMPLER_1D_ARRAY_EXT, SAMPLER_2D_ARRAY = GL_SAMPLER_2D_ARRAY_EXT, SAMPLER_1D_ARRAY_SHADOW = GL_SAMPLER_1D_ARRAY_SHADOW_EXT, SAMPLER_2D_ARRAY_SHADOW = GL_SAMPLER_2D_ARRAY_SHADOW_EXT, FLOAT_MAT2x3 = GL_FLOAT_MAT2x3, FLOAT_MAT2x4 = GL_FLOAT_MAT2x4, FLOAT_MAT3x2 = GL_FLOAT_MAT3x2, FLOAT_MAT3x4 = GL_FLOAT_MAT3x4, FLOAT_MAT4x2 = GL_FLOAT_MAT4x2, FLOAT_MAT4x3 = GL_FLOAT_MAT4x3, SAMPLER_BUFFER = GL_SAMPLER_BUFFER_EXT, SAMPLER_CUBE_SHADOW = GL_SAMPLER_CUBE_SHADOW_EXT, UNSIGNED_INT = GL_UNSIGNED_INT, UNSIGNED_INT_VEC2 = GL_UNSIGNED_INT_VEC2_EXT, UNSIGNED_INT_VEC3 = GL_UNSIGNED_INT_VEC3_EXT, UNSIGNED_INT_VEC4 = GL_UNSIGNED_INT_VEC4_EXT, INT_SAMPLER_1D = GL_INT_SAMPLER_1D_EXT, INT_SAMPLER_2D = GL_INT_SAMPLER_2D_EXT, INT_SAMPLER_3D = GL_INT_SAMPLER_3D_EXT, INT_SAMPLER_CUBE = GL_INT_SAMPLER_CUBE_EXT, INT_SAMPLER_2D_RECT = GL_INT_SAMPLER_2D_RECT_EXT, INT_SAMPLER_1D_ARRAY = GL_INT_SAMPLER_1D_ARRAY_EXT, INT_SAMPLER_2D_ARRAY = GL_INT_SAMPLER_2D_ARRAY_EXT, INT_SAMPLER_BUFFER = GL_INT_SAMPLER_BUFFER_EXT, UNSIGNED_INT_SAMPLER_1D = GL_UNSIGNED_INT_SAMPLER_1D_EXT, UNSIGNED_INT_SAMPLER_2D = GL_UNSIGNED_INT_SAMPLER_2D_EXT, UNSIGNED_INT_SAMPLER_3D = GL_UNSIGNED_INT_SAMPLER_3D_EXT, UNSIGNED_INT_SAMPLER_CUBE = GL_UNSIGNED_INT_SAMPLER_CUBE_EXT, UNSIGNED_INT_SAMPLER_2D_RECT = GL_UNSIGNED_INT_SAMPLER_2D_RECT_EXT, UNSIGNED_INT_SAMPLER_1D_ARRAY = GL_UNSIGNED_INT_SAMPLER_1D_ARRAY_EXT, UNSIGNED_INT_SAMPLER_2D_ARRAY = GL_UNSIGNED_INT_SAMPLER_2D_ARRAY_EXT, UNSIGNED_INT_SAMPLER_BUFFER = GL_UNSIGNED_INT_SAMPLER_BUFFER_EXT, UNDEFINED = 0x0 } |
typedef std::vector< StateSet * > | ParentList |
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) |
Type | getType () const |
virtual 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, unsigned 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, unsigned int i0, unsigned int i1) | |
Uniform (const char *name, unsigned int i0, unsigned int i1, unsigned int i2) | |
Uniform (const char *name, unsigned int i0, unsigned int i1, unsigned int i2, unsigned 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 (unsigned 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 (unsigned int i0, unsigned int i1) |
bool | set (unsigned int i0, unsigned int i1, unsigned int i2) |
bool | set (unsigned int i0, unsigned int i1, unsigned int i2, unsigned 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 (unsigned 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 (unsigned int &i0, unsigned int &i1) const |
bool | get (unsigned int &i0, unsigned int &i1, unsigned int &i2) const |
bool | get (unsigned int &i0, unsigned int &i1, unsigned int &i2, unsigned 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, unsigned 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, unsigned int i0, unsigned int i1) |
bool | setElement (unsigned int index, unsigned int i0, unsigned int i1, unsigned int i2) |
bool | setElement (unsigned int index, unsigned int i0, unsigned int i1, unsigned int i2, unsigned 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, unsigned 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, unsigned int &i0, unsigned int &i1) const |
bool | getElement (unsigned int index, unsigned int &i0, unsigned int &i1, unsigned int &i2) const |
bool | getElement (unsigned int index, unsigned int &i0, unsigned int &i1, unsigned int &i2, unsigned 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) |
bool | setArray (UIntArray *array) |
FloatArray * | getFloatArray () |
const FloatArray * | getFloatArray () const |
IntArray * | getIntArray () |
const IntArray * | getIntArray () const |
UIntArray * | getUIntArray () |
const UIntArray * | getUIntArray () const |
void | setModifiedCount (unsigned int mc) |
unsigned int | getModifiedCount () const |
unsigned int | getNameID () 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) |
static unsigned int | getNameID (const std::string &name) |
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 |
unsigned int | _nameID |
ref_ptr< FloatArray > | _floatArray |
ref_ptr< IntArray > | _intArray |
ref_ptr< UIntArray > | _uintArray |
ref_ptr< Callback > | _updateCallback |
ref_ptr< Callback > | _eventCallback |
unsigned int | _modifiedCount |
Friends | |
class | osg::StateSet |
Uniform encapsulates glUniform values
typedef std::vector<StateSet*> osg::Uniform::ParentList |
A vector of osg::StateSet pointers which is used to store the parent(s) of this Uniform, the parents could be osg::Node or osg::Drawable.
enum osg::Uniform::Type |
osg::Uniform::Uniform | ( | Type | type, |
const std::string & | name, | ||
int | numElements = 1 |
||
) |
osg::Uniform::Uniform | ( | const Uniform & | rhs, |
const CopyOp & | copyop = CopyOp::SHALLOW_COPY |
||
) |
Copy constructor using CopyOp to manage deep vs shallow copy.
osg::Uniform::Uniform | ( | const char * | name, |
float | f | ||
) | [explicit] |
convenient scalar (non-array) constructors w/ assignment
osg::Uniform::Uniform | ( | const char * | name, |
int | i | ||
) | [explicit] |
osg::Uniform::Uniform | ( | const char * | name, |
unsigned int | i | ||
) | [explicit] |
osg::Uniform::Uniform | ( | const char * | name, |
bool | b | ||
) | [explicit] |
osg::Uniform::Uniform | ( | const char * | name, |
const osg::Vec2 & | v2 | ||
) |
osg::Uniform::Uniform | ( | const char * | name, |
const osg::Vec3 & | v3 | ||
) |
osg::Uniform::Uniform | ( | const char * | name, |
const osg::Vec4 & | v4 | ||
) |
osg::Uniform::Uniform | ( | const char * | name, |
const osg::Matrix2 & | m2 | ||
) |
osg::Uniform::Uniform | ( | const char * | name, |
const osg::Matrix3 & | m3 | ||
) |
osg::Uniform::Uniform | ( | const char * | name, |
const osg::Matrixf & | m4 | ||
) |
osg::Uniform::Uniform | ( | const char * | name, |
const osg::Matrixd & | m4 | ||
) |
osg::Uniform::Uniform | ( | const char * | name, |
int | i0, | ||
int | i1 | ||
) |
osg::Uniform::Uniform | ( | const char * | name, |
int | i0, | ||
int | i1, | ||
int | i2 | ||
) |
osg::Uniform::Uniform | ( | const char * | name, |
int | i0, | ||
int | i1, | ||
int | i2, | ||
int | i3 | ||
) |
osg::Uniform::Uniform | ( | const char * | name, |
unsigned int | i0, | ||
unsigned int | i1 | ||
) |
osg::Uniform::Uniform | ( | const char * | name, |
unsigned int | i0, | ||
unsigned int | i1, | ||
unsigned int | i2 | ||
) |
osg::Uniform::Uniform | ( | const char * | name, |
unsigned int | i0, | ||
unsigned int | i1, | ||
unsigned int | i2, | ||
unsigned int | i3 | ||
) |
osg::Uniform::Uniform | ( | const char * | name, |
bool | b0, | ||
bool | b1 | ||
) |
osg::Uniform::Uniform | ( | const char * | name, |
bool | b0, | ||
bool | b1, | ||
bool | b2 | ||
) |
osg::Uniform::Uniform | ( | const char * | name, |
bool | b0, | ||
bool | b1, | ||
bool | b2, | ||
bool | b3 | ||
) |
virtual osg::Uniform::~Uniform | ( | ) | [protected, virtual] |
void osg::Uniform::addParent | ( | osg::StateSet * | object | ) | [protected] |
void osg::Uniform::allocateDataArray | ( | ) | [protected] |
void osg::Uniform::apply | ( | const GL2Extensions * | ext, |
GLint | location | ||
) | const |
Referenced by osg::Program::PerContextProgram::apply().
virtual int osg::Uniform::compare | ( | const Uniform & | rhs | ) | const [virtual] |
return -1 if *this < *rhs, 0 if *this==*rhs, 1 if *this>*rhs.
virtual int osg::Uniform::compareData | ( | const Uniform & | rhs | ) | const [virtual] |
void osg::Uniform::copyData | ( | const Uniform & | rhs | ) |
void osg::Uniform::dirty | ( | ) | [inline] |
Increment the modified count on the Uniform so Programs watching it know it update themselves. NOTE: automatically called during osg::Uniform::set*(); you must call if modifying the internal data array directly.
bool osg::Uniform::get | ( | float & | f | ) | const |
convenient scalar (non-array) value query
Referenced by osg::Program::PerContextProgram::apply(), osg::State::getModelViewMatrixUniform(), osg::State::getModelViewProjectionMatrixUniform(), osg::State::getNormalMatrixUniform(), osg::State::getProjectionMatrixUniform(), osg::ShaderAttribute::getUniform(), and osgVolume::ScalarProperty::getUniform().
bool osg::Uniform::get | ( | int & | i | ) | const |
bool osg::Uniform::get | ( | unsigned int & | i | ) | const |
bool osg::Uniform::get | ( | bool & | b | ) | const |
bool osg::Uniform::get | ( | osg::Vec2 & | v2 | ) | const |
bool osg::Uniform::get | ( | osg::Vec3 & | v3 | ) | const |
bool osg::Uniform::get | ( | osg::Vec4 & | v4 | ) | const |
bool osg::Uniform::get | ( | osg::Matrix2 & | m2 | ) | const |
bool osg::Uniform::get | ( | osg::Matrix3 & | m3 | ) | const |
bool osg::Uniform::get | ( | osg::Matrixf & | m4 | ) | const |
bool osg::Uniform::get | ( | osg::Matrixd & | m4 | ) | const |
bool osg::Uniform::get | ( | int & | i0, |
int & | i1 | ||
) | const |
bool osg::Uniform::get | ( | int & | i0, |
int & | i1, | ||
int & | i2 | ||
) | const |
bool osg::Uniform::get | ( | int & | i0, |
int & | i1, | ||
int & | i2, | ||
int & | i3 | ||
) | const |
bool osg::Uniform::get | ( | unsigned int & | i0, |
unsigned int & | i1 | ||
) | const |
bool osg::Uniform::get | ( | unsigned int & | i0, |
unsigned int & | i1, | ||
unsigned int & | i2 | ||
) | const |
bool osg::Uniform::get | ( | unsigned int & | i0, |
unsigned int & | i1, | ||
unsigned int & | i2, | ||
unsigned int & | i3 | ||
) | const |
bool osg::Uniform::get | ( | bool & | b0, |
bool & | b1 | ||
) | const |
bool osg::Uniform::get | ( | bool & | b0, |
bool & | b1, | ||
bool & | b2 | ||
) | const |
bool osg::Uniform::get | ( | bool & | b0, |
bool & | b1, | ||
bool & | b2, | ||
bool & | b3 | ||
) | const |
bool osg::Uniform::getElement | ( | unsigned int | index, |
float & | f | ||
) | const |
value query for array uniforms
bool osg::Uniform::getElement | ( | unsigned int | index, |
int & | i | ||
) | const |
bool osg::Uniform::getElement | ( | unsigned int | index, |
unsigned int & | i | ||
) | const |
bool osg::Uniform::getElement | ( | unsigned int | index, |
bool & | b | ||
) | const |
bool osg::Uniform::getElement | ( | unsigned int | index, |
osg::Vec2 & | v2 | ||
) | const |
bool osg::Uniform::getElement | ( | unsigned int | index, |
osg::Vec3 & | v3 | ||
) | const |
bool osg::Uniform::getElement | ( | unsigned int | index, |
osg::Vec4 & | v4 | ||
) | const |
bool osg::Uniform::getElement | ( | unsigned int | index, |
osg::Matrix2 & | m2 | ||
) | const |
bool osg::Uniform::getElement | ( | unsigned int | index, |
osg::Matrix3 & | m3 | ||
) | const |
bool osg::Uniform::getElement | ( | unsigned int | index, |
osg::Matrixf & | m4 | ||
) | const |
bool osg::Uniform::getElement | ( | unsigned int | index, |
osg::Matrixd & | m4 | ||
) | const |
bool osg::Uniform::getElement | ( | unsigned int | index, |
int & | i0, | ||
int & | i1 | ||
) | const |
bool osg::Uniform::getElement | ( | unsigned int | index, |
int & | i0, | ||
int & | i1, | ||
int & | i2 | ||
) | const |
bool osg::Uniform::getElement | ( | unsigned int | index, |
int & | i0, | ||
int & | i1, | ||
int & | i2, | ||
int & | i3 | ||
) | const |
bool osg::Uniform::getElement | ( | unsigned int | index, |
unsigned int & | i0, | ||
unsigned int & | i1 | ||
) | const |
bool osg::Uniform::getElement | ( | unsigned int | index, |
unsigned int & | i0, | ||
unsigned int & | i1, | ||
unsigned int & | i2 | ||
) | const |
bool osg::Uniform::getElement | ( | unsigned int | index, |
unsigned int & | i0, | ||
unsigned int & | i1, | ||
unsigned int & | i2, | ||
unsigned int & | i3 | ||
) | const |
bool osg::Uniform::getElement | ( | unsigned int | index, |
bool & | b0, | ||
bool & | b1 | ||
) | const |
bool osg::Uniform::getElement | ( | unsigned int | index, |
bool & | b0, | ||
bool & | b1, | ||
bool & | b2 | ||
) | const |
bool osg::Uniform::getElement | ( | unsigned int | index, |
bool & | b0, | ||
bool & | b1, | ||
bool & | b2, | ||
bool & | b3 | ||
) | const |
Callback* osg::Uniform::getEventCallback | ( | ) | [inline] |
Get the non const EventCallback.
const Callback* osg::Uniform::getEventCallback | ( | ) | const [inline] |
Get the const EventCallback.
FloatArray* osg::Uniform::getFloatArray | ( | ) | [inline] |
Get the internal data array for a float osg::Uniform.
const FloatArray* osg::Uniform::getFloatArray | ( | ) | const [inline] |
static Type osg::Uniform::getGlApiType | ( | Type | t | ) | [static] |
Return the GL API type corresponding to a GLSL type
IntArray* osg::Uniform::getIntArray | ( | ) | [inline] |
Get the internal data array for an int osg::Uniform.
const IntArray* osg::Uniform::getIntArray | ( | ) | const [inline] |
unsigned int osg::Uniform::getInternalArrayNumElements | ( | ) | const |
Get the number of elements required for the internal data array. Returns 0 if the osg::Uniform is not properly configured.
static GLenum osg::Uniform::getInternalArrayType | ( | Type | t | ) | [static] |
Return the internal data array type corresponding to a GLSL type
unsigned int osg::Uniform::getModifiedCount | ( | ) | const [inline] |
Referenced by osg::Program::PerContextProgram::apply().
static unsigned int osg::Uniform::getNameID | ( | const std::string & | name | ) | [static] |
Return the number that the name maps to uniquely
Referenced by osg::Program::PerContextProgram::apply().
unsigned int osg::Uniform::getNameID | ( | ) | const |
Get the number that the Uniform's name maps to uniquely
Referenced by osg::Program::PerContextProgram::getUniformLocation().
unsigned int osg::Uniform::getNumElements | ( | ) | const [inline] |
Get the number of GLSL elements of the osg::Uniform (1==scalar)
unsigned int osg::Uniform::getNumParents | ( | ) | const [inline] |
StateSet* osg::Uniform::getParent | ( | unsigned int | i | ) | [inline] |
const StateSet* osg::Uniform::getParent | ( | unsigned int | i | ) | const [inline] |
Get a single const parent of this Uniform.
i | index of the parent to get. |
const ParentList& osg::Uniform::getParents | ( | ) | const [inline] |
Get the parent list of this Uniform.
ParentList osg::Uniform::getParents | ( | ) | [inline] |
Get the a copy of parent list of node. A copy is returned to prevent modification of the parent list.
Type osg::Uniform::getType | ( | ) | const [inline] |
Get the type of glUniform as enum.
static Uniform::Type osg::Uniform::getTypeId | ( | const std::string & | tname | ) | [static] |
Return the Type enum of a Uniform typename string
static const char* osg::Uniform::getTypename | ( | Type | t | ) | [static] |
Return the name of a Type enum as string.
static int osg::Uniform::getTypeNumComponents | ( | Type | t | ) | [static] |
Return the the number of components for a GLSL type.
UIntArray* osg::Uniform::getUIntArray | ( | ) | [inline] |
Get the internal data array for an unsigned int osg::Uniform.
const UIntArray* osg::Uniform::getUIntArray | ( | ) | const [inline] |
Callback* osg::Uniform::getUpdateCallback | ( | ) | [inline] |
Get the non const UpdateCallback.
const Callback* osg::Uniform::getUpdateCallback | ( | ) | const [inline] |
Get the const UpdateCallback.
bool osg::Uniform::isCompatibleType | ( | Type | t | ) | const [protected] |
bool osg::Uniform::isScalar | ( | ) | const [inline, protected] |
osg::Uniform::META_Object | ( | osg | , |
Uniform | |||
) |
bool osg::Uniform::operator!= | ( | const Uniform & | rhs | ) | const [inline] |
bool osg::Uniform::operator< | ( | const Uniform & | rhs | ) | const [inline] |
bool osg::Uniform::operator== | ( | const Uniform & | rhs | ) | const [inline] |
void osg::Uniform::removeParent | ( | osg::StateSet * | object | ) | [protected] |
bool osg::Uniform::set | ( | float | f | ) |
convenient scalar (non-array) value assignment
bool osg::Uniform::set | ( | int | i | ) |
bool osg::Uniform::set | ( | unsigned int | i | ) |
bool osg::Uniform::set | ( | bool | b | ) |
bool osg::Uniform::set | ( | const osg::Vec2 & | v2 | ) |
bool osg::Uniform::set | ( | const osg::Vec3 & | v3 | ) |
bool osg::Uniform::set | ( | const osg::Vec4 & | v4 | ) |
bool osg::Uniform::set | ( | const osg::Matrix2 & | m2 | ) |
bool osg::Uniform::set | ( | const osg::Matrix3 & | m3 | ) |
bool osg::Uniform::set | ( | const osg::Matrixf & | m4 | ) |
bool osg::Uniform::set | ( | const osg::Matrixd & | m4 | ) |
bool osg::Uniform::set | ( | int | i0, |
int | i1 | ||
) |
bool osg::Uniform::set | ( | int | i0, |
int | i1, | ||
int | i2 | ||
) |
bool osg::Uniform::set | ( | int | i0, |
int | i1, | ||
int | i2, | ||
int | i3 | ||
) |
bool osg::Uniform::set | ( | unsigned int | i0, |
unsigned int | i1 | ||
) |
bool osg::Uniform::set | ( | unsigned int | i0, |
unsigned int | i1, | ||
unsigned int | i2 | ||
) |
bool osg::Uniform::set | ( | unsigned int | i0, |
unsigned int | i1, | ||
unsigned int | i2, | ||
unsigned int | i3 | ||
) |
bool osg::Uniform::set | ( | bool | b0, |
bool | b1 | ||
) |
bool osg::Uniform::set | ( | bool | b0, |
bool | b1, | ||
bool | b2 | ||
) |
bool osg::Uniform::set | ( | bool | b0, |
bool | b1, | ||
bool | b2, | ||
bool | b3 | ||
) |
bool osg::Uniform::setArray | ( | FloatArray * | array | ) |
Set the internal data array for a osg::Uniform
bool osg::Uniform::setArray | ( | IntArray * | array | ) |
bool osg::Uniform::setArray | ( | UIntArray * | array | ) |
bool osg::Uniform::setElement | ( | unsigned int | index, |
float | f | ||
) |
value assignment for array uniforms
bool osg::Uniform::setElement | ( | unsigned int | index, |
int | i | ||
) |
bool osg::Uniform::setElement | ( | unsigned int | index, |
unsigned int | i | ||
) |
bool osg::Uniform::setElement | ( | unsigned int | index, |
bool | b | ||
) |
bool osg::Uniform::setElement | ( | unsigned int | index, |
const osg::Vec2 & | v2 | ||
) |
bool osg::Uniform::setElement | ( | unsigned int | index, |
const osg::Vec3 & | v3 | ||
) |
bool osg::Uniform::setElement | ( | unsigned int | index, |
const osg::Vec4 & | v4 | ||
) |
bool osg::Uniform::setElement | ( | unsigned int | index, |
const osg::Matrix2 & | m2 | ||
) |
bool osg::Uniform::setElement | ( | unsigned int | index, |
const osg::Matrix3 & | m3 | ||
) |
bool osg::Uniform::setElement | ( | unsigned int | index, |
const osg::Matrixf & | m4 | ||
) |
bool osg::Uniform::setElement | ( | unsigned int | index, |
const osg::Matrixd & | m4 | ||
) |
bool osg::Uniform::setElement | ( | unsigned int | index, |
int | i0, | ||
int | i1 | ||
) |
bool osg::Uniform::setElement | ( | unsigned int | index, |
int | i0, | ||
int | i1, | ||
int | i2 | ||
) |
bool osg::Uniform::setElement | ( | unsigned int | index, |
int | i0, | ||
int | i1, | ||
int | i2, | ||
int | i3 | ||
) |
bool osg::Uniform::setElement | ( | unsigned int | index, |
unsigned int | i0, | ||
unsigned int | i1 | ||
) |
bool osg::Uniform::setElement | ( | unsigned int | index, |
unsigned int | i0, | ||
unsigned int | i1, | ||
unsigned int | i2 | ||
) |
bool osg::Uniform::setElement | ( | unsigned int | index, |
unsigned int | i0, | ||
unsigned int | i1, | ||
unsigned int | i2, | ||
unsigned int | i3 | ||
) |
bool osg::Uniform::setElement | ( | unsigned int | index, |
bool | b0, | ||
bool | b1 | ||
) |
bool osg::Uniform::setElement | ( | unsigned int | index, |
bool | b0, | ||
bool | b1, | ||
bool | b2 | ||
) |
bool osg::Uniform::setElement | ( | unsigned int | index, |
bool | b0, | ||
bool | b1, | ||
bool | b2, | ||
bool | b3 | ||
) |
Set the EventCallback which allows users to attach customize the updating of an object during the Event traversal.
void osg::Uniform::setModifiedCount | ( | unsigned int | mc | ) | [inline] |
virtual void osg::Uniform::setName | ( | const std::string & | name | ) | [virtual] |
Set the name of the glUniform, ensuring it is only set once.
Reimplemented from osg::Object.
void osg::Uniform::setNumElements | ( | unsigned int | numElements | ) |
Set the length of a uniform, ensuring it is only set once (1==scalar)
bool osg::Uniform::setType | ( | Type | t | ) |
Set the type of glUniform, ensuring it is only set once.
Set the UpdateCallback which allows users to attach customize the updating of an object during the update traversal.
friend class osg::StateSet [friend] |
ref_ptr<Callback> osg::Uniform::_eventCallback [protected] |
ref_ptr<FloatArray> osg::Uniform::_floatArray [protected] |
ref_ptr<IntArray> osg::Uniform::_intArray [protected] |
unsigned int osg::Uniform::_modifiedCount [protected] |
unsigned int osg::Uniform::_nameID [protected] |
unsigned int osg::Uniform::_numElements [protected] |
ParentList osg::Uniform::_parents [protected] |
Type osg::Uniform::_type [protected] |
ref_ptr<UIntArray> osg::Uniform::_uintArray [protected] |
ref_ptr<Callback> osg::Uniform::_updateCallback [protected] |