openscenegraph
Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | Friends | List of all members
osg::Uniform Class Reference

#include <Uniform>

Inheritance diagram for osg::Uniform:
osg::Object osg::Referenced

Public Types

enum  Type {
  FLOAT = GL_FLOAT , FLOAT_VEC2 = GL_FLOAT_VEC2 , FLOAT_VEC3 = GL_FLOAT_VEC3 , FLOAT_VEC4 = GL_FLOAT_VEC4 ,
  DOUBLE = GL_DOUBLE , DOUBLE_VEC2 = GL_DOUBLE_VEC2 , DOUBLE_VEC3 = GL_DOUBLE_VEC3 , DOUBLE_VEC4 = GL_DOUBLE_VEC4 ,
  INT = GL_INT , INT_VEC2 = GL_INT_VEC2 , INT_VEC3 = GL_INT_VEC3 , INT_VEC4 = GL_INT_VEC4 ,
  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 ,
  BOOL = GL_BOOL , BOOL_VEC2 = GL_BOOL_VEC2 , BOOL_VEC3 = GL_BOOL_VEC3 , BOOL_VEC4 = GL_BOOL_VEC4 ,
  INT64 = GL_INT64_ARB , UNSIGNED_INT64 = GL_UNSIGNED_INT64_ARB , FLOAT_MAT2 = GL_FLOAT_MAT2 , FLOAT_MAT3 = GL_FLOAT_MAT3 ,
  FLOAT_MAT4 = GL_FLOAT_MAT4 , 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 , DOUBLE_MAT2 = GL_DOUBLE_MAT2 ,
  DOUBLE_MAT3 = GL_DOUBLE_MAT3 , DOUBLE_MAT4 = GL_DOUBLE_MAT4 , DOUBLE_MAT2x3 = GL_DOUBLE_MAT2x3 , DOUBLE_MAT2x4 = GL_DOUBLE_MAT2x4 ,
  DOUBLE_MAT3x2 = GL_DOUBLE_MAT3x2 , DOUBLE_MAT3x4 = GL_DOUBLE_MAT3x4 , DOUBLE_MAT4x2 = GL_DOUBLE_MAT4x2 , DOUBLE_MAT4x3 = GL_DOUBLE_MAT4x3 ,
  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_CUBE_MAP_ARRAY = GL_SAMPLER_CUBE_MAP_ARRAY , SAMPLER_1D_ARRAY_SHADOW = GL_SAMPLER_1D_ARRAY_SHADOW_EXT , SAMPLER_2D_ARRAY_SHADOW = GL_SAMPLER_2D_ARRAY_SHADOW_EXT , SAMPLER_2D_MULTISAMPLE = GL_SAMPLER_2D_MULTISAMPLE ,
  SAMPLER_2D_MULTISAMPLE_ARRAY = GL_SAMPLER_2D_MULTISAMPLE_ARRAY , SAMPLER_CUBE_SHADOW = GL_SAMPLER_CUBE_SHADOW_EXT , SAMPLER_CUBE_MAP_ARRAY_SHADOW = GL_SAMPLER_CUBE_MAP_ARRAY_SHADOW , SAMPLER_BUFFER = GL_SAMPLER_BUFFER_EXT ,
  SAMPLER_2D_RECT = GL_SAMPLER_2D_RECT , SAMPLER_2D_RECT_SHADOW = GL_SAMPLER_2D_RECT_SHADOW , 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_1D_ARRAY = GL_INT_SAMPLER_1D_ARRAY_EXT , INT_SAMPLER_2D_ARRAY = GL_INT_SAMPLER_2D_ARRAY_EXT ,
  INT_SAMPLER_CUBE_MAP_ARRAY = GL_INT_SAMPLER_CUBE_MAP_ARRAY , INT_SAMPLER_2D_MULTISAMPLE = GL_INT_SAMPLER_2D_MULTISAMPLE , INT_SAMPLER_2D_MULTISAMPLE_ARRAY = GL_INT_SAMPLER_2D_MULTISAMPLE_ARRAY , INT_SAMPLER_BUFFER = GL_INT_SAMPLER_BUFFER_EXT ,
  INT_SAMPLER_2D_RECT = GL_INT_SAMPLER_2D_RECT_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_1D_ARRAY = GL_UNSIGNED_INT_SAMPLER_1D_ARRAY_EXT , UNSIGNED_INT_SAMPLER_2D_ARRAY = GL_UNSIGNED_INT_SAMPLER_2D_ARRAY_EXT , UNSIGNED_INT_SAMPLER_CUBE_MAP_ARRAY = GL_UNSIGNED_INT_SAMPLER_CUBE_MAP_ARRAY ,
  UNSIGNED_INT_SAMPLER_2D_MULTISAMPLE = GL_UNSIGNED_INT_SAMPLER_2D_MULTISAMPLE , UNSIGNED_INT_SAMPLER_2D_MULTISAMPLE_ARRAY = GL_UNSIGNED_INT_SAMPLER_2D_MULTISAMPLE_ARRAY , UNSIGNED_INT_SAMPLER_BUFFER = GL_UNSIGNED_INT_SAMPLER_BUFFER_EXT , UNSIGNED_INT_SAMPLER_2D_RECT = GL_UNSIGNED_INT_SAMPLER_2D_RECT_EXT ,
  IMAGE_1D = GL_IMAGE_1D , IMAGE_2D = GL_IMAGE_2D , IMAGE_3D = GL_IMAGE_3D , IMAGE_2D_RECT = GL_IMAGE_2D_RECT ,
  IMAGE_CUBE = GL_IMAGE_CUBE , IMAGE_BUFFER = GL_IMAGE_BUFFER , IMAGE_1D_ARRAY = GL_IMAGE_1D_ARRAY , IMAGE_2D_ARRAY = GL_IMAGE_2D_ARRAY ,
  IMAGE_CUBE_MAP_ARRAY = GL_IMAGE_CUBE_MAP_ARRAY , IMAGE_2D_MULTISAMPLE = GL_IMAGE_2D_MULTISAMPLE , IMAGE_2D_MULTISAMPLE_ARRAY = GL_IMAGE_2D_MULTISAMPLE_ARRAY , INT_IMAGE_1D = GL_INT_IMAGE_1D ,
  INT_IMAGE_2D = GL_INT_IMAGE_2D , INT_IMAGE_3D = GL_INT_IMAGE_3D , INT_IMAGE_2D_RECT = GL_INT_IMAGE_2D_RECT , INT_IMAGE_CUBE = GL_INT_IMAGE_CUBE ,
  INT_IMAGE_BUFFER = GL_INT_IMAGE_BUFFER , INT_IMAGE_1D_ARRAY = GL_INT_IMAGE_1D_ARRAY , INT_IMAGE_2D_ARRAY = GL_INT_IMAGE_2D_ARRAY , INT_IMAGE_CUBE_MAP_ARRAY = GL_INT_IMAGE_CUBE_MAP_ARRAY ,
  INT_IMAGE_2D_MULTISAMPLE = GL_INT_IMAGE_2D_MULTISAMPLE , INT_IMAGE_2D_MULTISAMPLE_ARRAY = GL_INT_IMAGE_2D_MULTISAMPLE_ARRAY , UNSIGNED_INT_IMAGE_1D = GL_UNSIGNED_INT_IMAGE_1D , UNSIGNED_INT_IMAGE_2D = GL_UNSIGNED_INT_IMAGE_2D ,
  UNSIGNED_INT_IMAGE_3D = GL_UNSIGNED_INT_IMAGE_3D , UNSIGNED_INT_IMAGE_2D_RECT = GL_UNSIGNED_INT_IMAGE_2D_RECT , UNSIGNED_INT_IMAGE_CUBE = GL_UNSIGNED_INT_IMAGE_CUBE , UNSIGNED_INT_IMAGE_BUFFER = GL_UNSIGNED_INT_IMAGE_BUFFER ,
  UNSIGNED_INT_IMAGE_1D_ARRAY = GL_UNSIGNED_INT_IMAGE_1D_ARRAY , UNSIGNED_INT_IMAGE_2D_ARRAY = GL_UNSIGNED_INT_IMAGE_2D_ARRAY , UNSIGNED_INT_IMAGE_CUBE_MAP_ARRAY = GL_UNSIGNED_INT_IMAGE_CUBE_MAP_ARRAY , UNSIGNED_INT_IMAGE_2D_MULTISAMPLE = GL_UNSIGNED_INT_IMAGE_2D_MULTISAMPLE ,
  UNSIGNED_INT_IMAGE_2D_MULTISAMPLE_ARRAY = GL_UNSIGNED_INT_IMAGE_2D_MULTISAMPLE_ARRAY , UNDEFINED = 0x0
}
 
typedef std::vector< StateSet * > ParentList
 
typedef UniformCallback Callback
 
- Public Types inherited from osg::Object
enum  DataVariance { DYNAMIC , STATIC , UNSPECIFIED }
 

Public Member Functions

 Uniform ()
 
 Uniform (Type type, const std::string &name, int numElements=1)
 
 Uniform (const Uniform &rhs, const CopyOp &copyop=CopyOp::SHALLOW_COPY)
 
 META_Object (osg, Uniform)
 
virtual UniformasUniform ()
 
virtual const UniformasUniform () const
 
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, double d)
 
 Uniform (const char *name, int i)
 
 Uniform (const char *name, unsigned int ui)
 
 Uniform (const char *name, bool b)
 
 Uniform (const char *name, unsigned long long ull)
 
 Uniform (const char *name, long long ll)
 
 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::Vec2d &v2)
 
 Uniform (const char *name, const osg::Vec3d &v3)
 
 Uniform (const char *name, const osg::Vec4d &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::Matrix2x3 &m2x3)
 
 Uniform (const char *name, const osg::Matrix2x4 &m2x4)
 
 Uniform (const char *name, const osg::Matrix3x2 &m3x2)
 
 Uniform (const char *name, const osg::Matrix3x4 &m3x4)
 
 Uniform (const char *name, const osg::Matrix4x2 &m4x2)
 
 Uniform (const char *name, const osg::Matrix4x3 &m4x3)
 
 Uniform (const char *name, const osg::Matrix2d &m2)
 
 Uniform (const char *name, const osg::Matrix3d &m3)
 
 Uniform (const char *name, const osg::Matrixd &m4)
 
 Uniform (const char *name, const osg::Matrix2x3d &m2x3)
 
 Uniform (const char *name, const osg::Matrix2x4d &m2x4)
 
 Uniform (const char *name, const osg::Matrix3x2d &m3x2)
 
 Uniform (const char *name, const osg::Matrix3x4d &m3x4)
 
 Uniform (const char *name, const osg::Matrix4x2d &m4x2)
 
 Uniform (const char *name, const osg::Matrix4x3d &m4x3)
 
 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 ui0, unsigned int ui1)
 
 Uniform (const char *name, unsigned int ui0, unsigned int ui1, unsigned int ui2)
 
 Uniform (const char *name, unsigned int ui0, unsigned int ui1, unsigned int ui2, unsigned int ui3)
 
 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 ParentListgetParents () const
 
ParentList getParents ()
 
StateSetgetParent (unsigned int i)
 
const StateSetgetParent (unsigned int i) const
 
unsigned int getNumParents () const
 
bool set (float f)
 
bool set (double d)
 
bool set (int i)
 
bool set (unsigned int ui)
 
bool set (bool b)
 
bool set (unsigned long long ull)
 
bool set (long long ll)
 
bool set (const osg::Vec2 &v2)
 
bool set (const osg::Vec3 &v3)
 
bool set (const osg::Vec4 &v4)
 
bool set (const osg::Vec2d &v2)
 
bool set (const osg::Vec3d &v3)
 
bool set (const osg::Vec4d &v4)
 
bool set (const osg::Matrix2 &m2)
 
bool set (const osg::Matrix3 &m3)
 
bool set (const osg::Matrixf &m4)
 
bool set (const osg::Matrix2x3 &m2x3)
 
bool set (const osg::Matrix2x4 &m2x4)
 
bool set (const osg::Matrix3x2 &m3x2)
 
bool set (const osg::Matrix3x4 &m3x4)
 
bool set (const osg::Matrix4x2 &m4x2)
 
bool set (const osg::Matrix4x3 &m4x3)
 
bool set (const osg::Matrix2d &m2)
 
bool set (const osg::Matrix3d &m3)
 
bool set (const osg::Matrixd &m4)
 
bool set (const osg::Matrix2x3d &m2x3)
 
bool set (const osg::Matrix2x4d &m2x4)
 
bool set (const osg::Matrix3x2d &m3x2)
 
bool set (const osg::Matrix3x4d &m3x4)
 
bool set (const osg::Matrix4x2d &m4x2)
 
bool set (const osg::Matrix4x3d &m4x3)
 
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 ui0, unsigned int ui1)
 
bool set (unsigned int ui0, unsigned int ui1, unsigned int ui2)
 
bool set (unsigned int ui0, unsigned int ui1, unsigned int ui2, unsigned int ui3)
 
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 (double &d) const
 
bool get (int &i) const
 
bool get (unsigned int &ui) const
 
bool get (bool &b) const
 
bool get (unsigned long long &ull) const
 
bool get (long long &ll) const
 
bool get (osg::Vec2 &v2) const
 
bool get (osg::Vec3 &v3) const
 
bool get (osg::Vec4 &v4) const
 
bool get (osg::Vec2d &v2) const
 
bool get (osg::Vec3d &v3) const
 
bool get (osg::Vec4d &v4) const
 
bool get (osg::Matrix2 &m2) const
 
bool get (osg::Matrix3 &m3) const
 
bool get (osg::Matrixf &m4) const
 
bool get (osg::Matrix2x3 &m2x3) const
 
bool get (osg::Matrix2x4 &m2x4) const
 
bool get (osg::Matrix3x2 &m3x2) const
 
bool get (osg::Matrix3x4 &m3x4) const
 
bool get (osg::Matrix4x2 &m4x2) const
 
bool get (osg::Matrix4x3 &m4x3) const
 
bool get (osg::Matrix2d &m2) const
 
bool get (osg::Matrix3d &m3) const
 
bool get (osg::Matrixd &m4) const
 
bool get (osg::Matrix2x3d &m2x3) const
 
bool get (osg::Matrix2x4d &m2x4) const
 
bool get (osg::Matrix3x2d &m3x2) const
 
bool get (osg::Matrix3x4d &m3x4) const
 
bool get (osg::Matrix4x2d &m4x2) const
 
bool get (osg::Matrix4x3d &m4x3) 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 &ui0, unsigned int &ui1) const
 
bool get (unsigned int &ui0, unsigned int &ui1, unsigned int &ui2) const
 
bool get (unsigned int &ui0, unsigned int &ui1, unsigned int &ui2, unsigned int &ui3) 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, double d)
 
bool setElement (unsigned int index, int i)
 
bool setElement (unsigned int index, unsigned int ui)
 
bool setElement (unsigned int index, bool b)
 
bool setElement (unsigned int index, unsigned long long ull)
 
bool setElement (unsigned int index, long long ll)
 
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::Vec2d &v2)
 
bool setElement (unsigned int index, const osg::Vec3d &v3)
 
bool setElement (unsigned int index, const osg::Vec4d &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::Matrix2x3 &m2x3)
 
bool setElement (unsigned int index, const osg::Matrix2x4 &m2x4)
 
bool setElement (unsigned int index, const osg::Matrix3x2 &m3x2)
 
bool setElement (unsigned int index, const osg::Matrix3x4 &m3x4)
 
bool setElement (unsigned int index, const osg::Matrix4x2 &m4x2)
 
bool setElement (unsigned int index, const osg::Matrix4x3 &m4x3)
 
bool setElement (unsigned int index, const osg::Matrix2d &m2)
 
bool setElement (unsigned int index, const osg::Matrix3d &m3)
 
bool setElement (unsigned int index, const osg::Matrixd &m4)
 
bool setElement (unsigned int index, const osg::Matrix2x3d &m2x3)
 
bool setElement (unsigned int index, const osg::Matrix2x4d &m2x4)
 
bool setElement (unsigned int index, const osg::Matrix3x2d &m3x2)
 
bool setElement (unsigned int index, const osg::Matrix3x4d &m3x4)
 
bool setElement (unsigned int index, const osg::Matrix4x2d &m4x2)
 
bool setElement (unsigned int index, const osg::Matrix4x3d &m4x3)
 
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 ui0, unsigned int ui1)
 
bool setElement (unsigned int index, unsigned int ui0, unsigned int ui1, unsigned int ui2)
 
bool setElement (unsigned int index, unsigned int ui0, unsigned int ui1, unsigned int ui2, unsigned int ui3)
 
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, double &d) const
 
bool getElement (unsigned int index, int &i) const
 
bool getElement (unsigned int index, unsigned int &ui) const
 
bool getElement (unsigned int index, bool &b) const
 
bool getElement (unsigned int index, unsigned long long &ull) const
 
bool getElement (unsigned int index, long long &ll) 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::Vec2d &v2) const
 
bool getElement (unsigned int index, osg::Vec3d &v3) const
 
bool getElement (unsigned int index, osg::Vec4d &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::Matrix2x3 &m2x3) const
 
bool getElement (unsigned int index, osg::Matrix2x4 &m2x4) const
 
bool getElement (unsigned int index, osg::Matrix3x2 &m3x2) const
 
bool getElement (unsigned int index, osg::Matrix3x4 &m3x4) const
 
bool getElement (unsigned int index, osg::Matrix4x2 &m4x2) const
 
bool getElement (unsigned int index, osg::Matrix4x3 &m4x3) const
 
bool getElement (unsigned int index, osg::Matrix2d &m2) const
 
bool getElement (unsigned int index, osg::Matrix3d &m3) const
 
bool getElement (unsigned int index, osg::Matrixd &m4) const
 
bool getElement (unsigned int index, osg::Matrix2x3d &m2x3) const
 
bool getElement (unsigned int index, osg::Matrix2x4d &m2x4) const
 
bool getElement (unsigned int index, osg::Matrix3x2d &m3x2) const
 
bool getElement (unsigned int index, osg::Matrix3x4d &m3x4) const
 
bool getElement (unsigned int index, osg::Matrix4x2d &m4x2) const
 
bool getElement (unsigned int index, osg::Matrix4x3d &m4x3) 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 &ui0, unsigned int &ui1) const
 
bool getElement (unsigned int index, unsigned int &ui0, unsigned int &ui1, unsigned int &ui2) const
 
bool getElement (unsigned int index, unsigned int &ui0, unsigned int &ui1, unsigned int &ui2, unsigned int &ui3) 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 (UniformCallback *uc)
 
UniformCallbackgetUpdateCallback ()
 
const UniformCallbackgetUpdateCallback () const
 
void setEventCallback (UniformCallback *ec)
 
UniformCallbackgetEventCallback ()
 
const UniformCallbackgetEventCallback () const
 
void dirty ()
 
bool setArray (FloatArray *array)
 
bool setArray (DoubleArray *array)
 
bool setArray (IntArray *array)
 
bool setArray (UIntArray *array)
 
bool setArray (UInt64Array *array)
 
bool setArray (Int64Array *array)
 
FloatArraygetFloatArray ()
 
const FloatArraygetFloatArray () const
 
DoubleArraygetDoubleArray ()
 
const DoubleArraygetDoubleArray () const
 
IntArraygetIntArray ()
 
const IntArraygetIntArray () const
 
UIntArraygetUIntArray ()
 
const UIntArraygetUIntArray () const
 
UInt64ArraygetUInt64Array ()
 
const UInt64ArraygetUInt64Array () const
 
Int64ArraygetInt64Array ()
 
const Int64ArraygetInt64Array () const
 
void setModifiedCount (unsigned int mc)
 
unsigned int getModifiedCount () const
 
unsigned int getNameID () const
 
void apply (const GLExtensions *ext, GLint location) const
 
- Public Member Functions inherited from osg::Object
 Object ()
 
 Object (bool threadSafeRefUnref)
 
 Object (const Object &, const CopyOp &copyop=CopyOp::SHALLOW_COPY)
 
virtual ObjectcloneType () const =0
 
virtual Objectclone (const CopyOp &) const =0
 
virtual bool isSameKindAs (const Object *) const
 
virtual const char * libraryName () const =0
 
virtual const char * className () const =0
 
std::string getCompoundClassName () const
 
virtual NodeasNode ()
 
virtual const NodeasNode () const
 
virtual NodeVisitorasNodeVisitor ()
 
virtual const NodeVisitorasNodeVisitor () const
 
virtual StateSetasStateSet ()
 
virtual const StateSetasStateSet () const
 
virtual StateAttributeasStateAttribute ()
 
virtual const StateAttributeasStateAttribute () const
 
virtual CameraasCamera ()
 
virtual const CameraasCamera () const
 
virtual DrawableasDrawable ()
 
virtual const DrawableasDrawable () const
 
virtual CallbackasCallback ()
 
virtual const CallbackasCallback () const
 
virtual CallbackObjectasCallbackObject ()
 
virtual const CallbackObjectasCallbackObject () const
 
virtual UserDataContainerasUserDataContainer ()
 
virtual const UserDataContainerasUserDataContainer () const
 
virtual ValueObjectasValueObject ()
 
virtual const ValueObjectasValueObject () const
 
virtual ImageasImage ()
 
virtual const ImageasImage () const
 
virtual void setThreadSafeRefUnref (bool threadSafe)
 
void setName (const char *name)
 
const std::string & getName () const
 
void setDataVariance (DataVariance dv)
 
DataVariance getDataVariance () const
 
virtual void computeDataVariance ()
 
void setUserDataContainer (osg::UserDataContainer *udc)
 
template<class T >
void setUserDataContainer (const ref_ptr< T > &udc)
 
osg::UserDataContainergetUserDataContainer ()
 
const osg::UserDataContainergetUserDataContainer () const
 
osg::UserDataContainergetOrCreateUserDataContainer ()
 
virtual void setUserData (Referenced *obj)
 
template<class T >
void setUserData (const ref_ptr< T > &ud)
 
virtual ReferencedgetUserData ()
 
virtual const ReferencedgetUserData () const
 
template<typename T >
bool getUserValue (const std::string &name, T &value) const
 
template<typename T >
void setUserValue (const std::string &name, const T &value)
 
virtual void resizeGLObjectBuffers (unsigned int)
 
virtual void releaseGLObjects (osg::State *=0) const
 
template<typename T >
BoolValueObject UCharValueObject UShortValueObject UIntValueObject DoubleValueObject Vec3fValueObject Vec2dValueObject Vec4dValueObject PlaneValueObject MatrixdValueObject BoundingBoxdValueObject BoundingSpheredValueObject bool getUserValue (const std::string &name, T &value) const
 
- Public Member Functions inherited from osg::Referenced
 Referenced ()
 
 Referenced (bool threadSafeRefUnref)
 
 Referenced (const Referenced &)
 
Referencedoperator= (const Referenced &)
 
bool getThreadSafeRefUnref () const
 
OpenThreads::MutexgetRefMutex () const
 
int ref () const
 
int unref () const
 
int unref_nodelete () const
 
int referenceCount () const
 
ObserverSetgetObserverSet () const
 
ObserverSetgetOrCreateObserverSet () const
 
void addObserver (Observer *observer) const
 
void removeObserver (Observer *observer) 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)
 
- Static Public Member Functions inherited from osg::Referenced
static OpenThreads::MutexgetGlobalReferencedMutex ()
 
static void setDeleteHandler (DeleteHandler *handler)
 
static DeleteHandlergetDeleteHandler ()
 

Protected Member Functions

virtual ~Uniform ()
 
Uniformoperator= (const Uniform &)
 
bool isCompatibleType (Type t) const
 
bool isCompatibleType (Type t1, Type t2) const
 
bool isScalar () const
 
void allocateDataArray ()
 
void addParent (osg::StateSet *object)
 
void removeParent (osg::StateSet *object)
 
- Protected Member Functions inherited from osg::Object
virtual ~Object ()
 
- Protected Member Functions inherited from osg::Referenced
virtual ~Referenced ()
 
void signalObserversAndDelete (bool signalDelete, bool doDelete) const
 
void deleteUsingDeleteHandler () const
 

Protected Attributes

ParentList _parents
 
Type _type
 
unsigned int _numElements
 
unsigned int _nameID
 
ref_ptr< FloatArray_floatArray
 
ref_ptr< DoubleArray_doubleArray
 
ref_ptr< IntArray_intArray
 
ref_ptr< UIntArray_uintArray
 
ref_ptr< Int64Array_int64Array
 
ref_ptr< UInt64Array_uint64Array
 
ref_ptr< UniformCallback_updateCallback
 
ref_ptr< UniformCallback_eventCallback
 
unsigned int _modifiedCount
 
- Protected Attributes inherited from osg::Object
std::string _name
 
DataVariance _dataVariance
 
osg::UserDataContainer_userDataContainer
 
- Protected Attributes inherited from osg::Referenced
OpenThreads::AtomicPtr _observerSet
 
OpenThreads::Atomic _refCount
 

Friends

class osg::StateSet
 

Detailed Description

Uniform encapsulates glUniform values

Member Typedef Documentation

◆ Callback

provide typedef for backwards compatibility to OSG-3.2 and other previous versions.

◆ ParentList

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.

Member Enumeration Documentation

◆ Type

Enumerator
FLOAT 
FLOAT_VEC2 
FLOAT_VEC3 
FLOAT_VEC4 
DOUBLE 
DOUBLE_VEC2 
DOUBLE_VEC3 
DOUBLE_VEC4 
INT 
INT_VEC2 
INT_VEC3 
INT_VEC4 
UNSIGNED_INT 
UNSIGNED_INT_VEC2 
UNSIGNED_INT_VEC3 
UNSIGNED_INT_VEC4 
BOOL 
BOOL_VEC2 
BOOL_VEC3 
BOOL_VEC4 
INT64 
UNSIGNED_INT64 
FLOAT_MAT2 
FLOAT_MAT3 
FLOAT_MAT4 
FLOAT_MAT2x3 
FLOAT_MAT2x4 
FLOAT_MAT3x2 
FLOAT_MAT3x4 
FLOAT_MAT4x2 
FLOAT_MAT4x3 
DOUBLE_MAT2 
DOUBLE_MAT3 
DOUBLE_MAT4 
DOUBLE_MAT2x3 
DOUBLE_MAT2x4 
DOUBLE_MAT3x2 
DOUBLE_MAT3x4 
DOUBLE_MAT4x2 
DOUBLE_MAT4x3 
SAMPLER_1D 
SAMPLER_2D 
SAMPLER_3D 
SAMPLER_CUBE 
SAMPLER_1D_SHADOW 
SAMPLER_2D_SHADOW 
SAMPLER_1D_ARRAY 
SAMPLER_2D_ARRAY 
SAMPLER_CUBE_MAP_ARRAY 
SAMPLER_1D_ARRAY_SHADOW 
SAMPLER_2D_ARRAY_SHADOW 
SAMPLER_2D_MULTISAMPLE 
SAMPLER_2D_MULTISAMPLE_ARRAY 
SAMPLER_CUBE_SHADOW 
SAMPLER_CUBE_MAP_ARRAY_SHADOW 
SAMPLER_BUFFER 
SAMPLER_2D_RECT 
SAMPLER_2D_RECT_SHADOW 
INT_SAMPLER_1D 
INT_SAMPLER_2D 
INT_SAMPLER_3D 
INT_SAMPLER_CUBE 
INT_SAMPLER_1D_ARRAY 
INT_SAMPLER_2D_ARRAY 
INT_SAMPLER_CUBE_MAP_ARRAY 
INT_SAMPLER_2D_MULTISAMPLE 
INT_SAMPLER_2D_MULTISAMPLE_ARRAY 
INT_SAMPLER_BUFFER 
INT_SAMPLER_2D_RECT 
UNSIGNED_INT_SAMPLER_1D 
UNSIGNED_INT_SAMPLER_2D 
UNSIGNED_INT_SAMPLER_3D 
UNSIGNED_INT_SAMPLER_CUBE 
UNSIGNED_INT_SAMPLER_1D_ARRAY 
UNSIGNED_INT_SAMPLER_2D_ARRAY 
UNSIGNED_INT_SAMPLER_CUBE_MAP_ARRAY 
UNSIGNED_INT_SAMPLER_2D_MULTISAMPLE 
UNSIGNED_INT_SAMPLER_2D_MULTISAMPLE_ARRAY 
UNSIGNED_INT_SAMPLER_BUFFER 
UNSIGNED_INT_SAMPLER_2D_RECT 
IMAGE_1D 
IMAGE_2D 
IMAGE_3D 
IMAGE_2D_RECT 
IMAGE_CUBE 
IMAGE_BUFFER 
IMAGE_1D_ARRAY 
IMAGE_2D_ARRAY 
IMAGE_CUBE_MAP_ARRAY 
IMAGE_2D_MULTISAMPLE 
IMAGE_2D_MULTISAMPLE_ARRAY 
INT_IMAGE_1D 
INT_IMAGE_2D 
INT_IMAGE_3D 
INT_IMAGE_2D_RECT 
INT_IMAGE_CUBE 
INT_IMAGE_BUFFER 
INT_IMAGE_1D_ARRAY 
INT_IMAGE_2D_ARRAY 
INT_IMAGE_CUBE_MAP_ARRAY 
INT_IMAGE_2D_MULTISAMPLE 
INT_IMAGE_2D_MULTISAMPLE_ARRAY 
UNSIGNED_INT_IMAGE_1D 
UNSIGNED_INT_IMAGE_2D 
UNSIGNED_INT_IMAGE_3D 
UNSIGNED_INT_IMAGE_2D_RECT 
UNSIGNED_INT_IMAGE_CUBE 
UNSIGNED_INT_IMAGE_BUFFER 
UNSIGNED_INT_IMAGE_1D_ARRAY 
UNSIGNED_INT_IMAGE_2D_ARRAY 
UNSIGNED_INT_IMAGE_CUBE_MAP_ARRAY 
UNSIGNED_INT_IMAGE_2D_MULTISAMPLE 
UNSIGNED_INT_IMAGE_2D_MULTISAMPLE_ARRAY 
UNDEFINED 

Constructor & Destructor Documentation

◆ Uniform() [1/43]

osg::Uniform::Uniform ( )

◆ Uniform() [2/43]

osg::Uniform::Uniform ( Type  type,
const std::string &  name,
int  numElements = 1 
)

◆ Uniform() [3/43]

osg::Uniform::Uniform ( const Uniform rhs,
const CopyOp copyop = CopyOp::SHALLOW_COPY 
)

Copy constructor using CopyOp to manage deep vs shallow copy.

◆ Uniform() [4/43]

osg::Uniform::Uniform ( const char *  name,
float  f 
)
explicit

convenient scalar (non-array) constructors w/ assignment

◆ Uniform() [5/43]

osg::Uniform::Uniform ( const char *  name,
double  d 
)
explicit

◆ Uniform() [6/43]

osg::Uniform::Uniform ( const char *  name,
int  i 
)
explicit

◆ Uniform() [7/43]

osg::Uniform::Uniform ( const char *  name,
unsigned int  ui 
)
explicit

◆ Uniform() [8/43]

osg::Uniform::Uniform ( const char *  name,
bool  b 
)
explicit

◆ Uniform() [9/43]

osg::Uniform::Uniform ( const char *  name,
unsigned long long  ull 
)
explicit

◆ Uniform() [10/43]

osg::Uniform::Uniform ( const char *  name,
long long  ll 
)
explicit

◆ Uniform() [11/43]

osg::Uniform::Uniform ( const char *  name,
const osg::Vec2 v2 
)

◆ Uniform() [12/43]

osg::Uniform::Uniform ( const char *  name,
const osg::Vec3 v3 
)

◆ Uniform() [13/43]

osg::Uniform::Uniform ( const char *  name,
const osg::Vec4 v4 
)

◆ Uniform() [14/43]

osg::Uniform::Uniform ( const char *  name,
const osg::Vec2d v2 
)

◆ Uniform() [15/43]

osg::Uniform::Uniform ( const char *  name,
const osg::Vec3d v3 
)

◆ Uniform() [16/43]

osg::Uniform::Uniform ( const char *  name,
const osg::Vec4d v4 
)

◆ Uniform() [17/43]

osg::Uniform::Uniform ( const char *  name,
const osg::Matrix2 m2 
)

◆ Uniform() [18/43]

osg::Uniform::Uniform ( const char *  name,
const osg::Matrix3 m3 
)

◆ Uniform() [19/43]

osg::Uniform::Uniform ( const char *  name,
const osg::Matrixf m4 
)

◆ Uniform() [20/43]

osg::Uniform::Uniform ( const char *  name,
const osg::Matrix2x3 m2x3 
)

◆ Uniform() [21/43]

osg::Uniform::Uniform ( const char *  name,
const osg::Matrix2x4 m2x4 
)

◆ Uniform() [22/43]

osg::Uniform::Uniform ( const char *  name,
const osg::Matrix3x2 m3x2 
)

◆ Uniform() [23/43]

osg::Uniform::Uniform ( const char *  name,
const osg::Matrix3x4 m3x4 
)

◆ Uniform() [24/43]

osg::Uniform::Uniform ( const char *  name,
const osg::Matrix4x2 m4x2 
)

◆ Uniform() [25/43]

osg::Uniform::Uniform ( const char *  name,
const osg::Matrix4x3 m4x3 
)

◆ Uniform() [26/43]

osg::Uniform::Uniform ( const char *  name,
const osg::Matrix2d m2 
)

◆ Uniform() [27/43]

osg::Uniform::Uniform ( const char *  name,
const osg::Matrix3d m3 
)

◆ Uniform() [28/43]

osg::Uniform::Uniform ( const char *  name,
const osg::Matrixd m4 
)

◆ Uniform() [29/43]

osg::Uniform::Uniform ( const char *  name,
const osg::Matrix2x3d m2x3 
)

◆ Uniform() [30/43]

osg::Uniform::Uniform ( const char *  name,
const osg::Matrix2x4d m2x4 
)

◆ Uniform() [31/43]

osg::Uniform::Uniform ( const char *  name,
const osg::Matrix3x2d m3x2 
)

◆ Uniform() [32/43]

osg::Uniform::Uniform ( const char *  name,
const osg::Matrix3x4d m3x4 
)

◆ Uniform() [33/43]

osg::Uniform::Uniform ( const char *  name,
const osg::Matrix4x2d m4x2 
)

◆ Uniform() [34/43]

osg::Uniform::Uniform ( const char *  name,
const osg::Matrix4x3d m4x3 
)

◆ Uniform() [35/43]

osg::Uniform::Uniform ( const char *  name,
int  i0,
int  i1 
)

◆ Uniform() [36/43]

osg::Uniform::Uniform ( const char *  name,
int  i0,
int  i1,
int  i2 
)

◆ Uniform() [37/43]

osg::Uniform::Uniform ( const char *  name,
int  i0,
int  i1,
int  i2,
int  i3 
)

◆ Uniform() [38/43]

osg::Uniform::Uniform ( const char *  name,
unsigned int  ui0,
unsigned int  ui1 
)

◆ Uniform() [39/43]

osg::Uniform::Uniform ( const char *  name,
unsigned int  ui0,
unsigned int  ui1,
unsigned int  ui2 
)

◆ Uniform() [40/43]

osg::Uniform::Uniform ( const char *  name,
unsigned int  ui0,
unsigned int  ui1,
unsigned int  ui2,
unsigned int  ui3 
)

◆ Uniform() [41/43]

osg::Uniform::Uniform ( const char *  name,
bool  b0,
bool  b1 
)

◆ Uniform() [42/43]

osg::Uniform::Uniform ( const char *  name,
bool  b0,
bool  b1,
bool  b2 
)

◆ Uniform() [43/43]

osg::Uniform::Uniform ( const char *  name,
bool  b0,
bool  b1,
bool  b2,
bool  b3 
)

◆ ~Uniform()

virtual osg::Uniform::~Uniform ( )
protectedvirtual

Member Function Documentation

◆ addParent()

void osg::Uniform::addParent ( osg::StateSet object)
protected

◆ allocateDataArray()

void osg::Uniform::allocateDataArray ( )
protected

◆ apply()

void osg::Uniform::apply ( const GLExtensions ext,
GLint  location 
) const

◆ asUniform() [1/2]

virtual Uniform * osg::Uniform::asUniform ( )
inlinevirtual

Convert 'this' into a Uniform pointer if Object is a Uniform, otherwise return 0. Equivalent to dynamic_cast<Uniform*>(this).

Reimplemented from osg::Object.

◆ asUniform() [2/2]

virtual const Uniform * osg::Uniform::asUniform ( ) const
inlinevirtual

convert 'const this' into a const Uniform pointer if Object is a Uniform, otherwise return 0. Equivalent to dynamic_cast<const Uniform*>(this).

Reimplemented from osg::Object.

◆ compare()

virtual int osg::Uniform::compare ( const Uniform rhs) const
virtual

return -1 if *this < *rhs, 0 if *this==*rhs, 1 if *this>*rhs.

◆ compareData()

virtual int osg::Uniform::compareData ( const Uniform rhs) const
virtual

◆ copyData()

void osg::Uniform::copyData ( const Uniform rhs)

◆ dirty()

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.

◆ get() [1/40]

bool osg::Uniform::get ( bool &  b) const

◆ get() [2/40]

bool osg::Uniform::get ( bool &  b0,
bool &  b1 
) const

◆ get() [3/40]

bool osg::Uniform::get ( bool &  b0,
bool &  b1,
bool &  b2 
) const

◆ get() [4/40]

bool osg::Uniform::get ( bool &  b0,
bool &  b1,
bool &  b2,
bool &  b3 
) const

◆ get() [5/40]

bool osg::Uniform::get ( double &  d) const

◆ get() [6/40]

bool osg::Uniform::get ( float &  f) const

convenient scalar (non-array) value query

◆ get() [7/40]

bool osg::Uniform::get ( int &  i) const

◆ get() [8/40]

bool osg::Uniform::get ( int &  i0,
int &  i1 
) const

◆ get() [9/40]

bool osg::Uniform::get ( int &  i0,
int &  i1,
int &  i2 
) const

◆ get() [10/40]

bool osg::Uniform::get ( int &  i0,
int &  i1,
int &  i2,
int &  i3 
) const

◆ get() [11/40]

bool osg::Uniform::get ( long long &  ll) const

◆ get() [12/40]

bool osg::Uniform::get ( osg::Matrix2 m2) const

◆ get() [13/40]

bool osg::Uniform::get ( osg::Matrix2d m2) const

◆ get() [14/40]

bool osg::Uniform::get ( osg::Matrix2x3 m2x3) const

◆ get() [15/40]

bool osg::Uniform::get ( osg::Matrix2x3d m2x3) const

◆ get() [16/40]

bool osg::Uniform::get ( osg::Matrix2x4 m2x4) const

◆ get() [17/40]

bool osg::Uniform::get ( osg::Matrix2x4d m2x4) const

◆ get() [18/40]

bool osg::Uniform::get ( osg::Matrix3 m3) const

◆ get() [19/40]

bool osg::Uniform::get ( osg::Matrix3d m3) const

◆ get() [20/40]

bool osg::Uniform::get ( osg::Matrix3x2 m3x2) const

◆ get() [21/40]

bool osg::Uniform::get ( osg::Matrix3x2d m3x2) const

◆ get() [22/40]

bool osg::Uniform::get ( osg::Matrix3x4 m3x4) const

◆ get() [23/40]

bool osg::Uniform::get ( osg::Matrix3x4d m3x4) const

◆ get() [24/40]

bool osg::Uniform::get ( osg::Matrix4x2 m4x2) const

◆ get() [25/40]

bool osg::Uniform::get ( osg::Matrix4x2d m4x2) const

◆ get() [26/40]

bool osg::Uniform::get ( osg::Matrix4x3 m4x3) const

◆ get() [27/40]

bool osg::Uniform::get ( osg::Matrix4x3d m4x3) const

◆ get() [28/40]

bool osg::Uniform::get ( osg::Matrixd m4) const

◆ get() [29/40]

bool osg::Uniform::get ( osg::Matrixf m4) const

◆ get() [30/40]

bool osg::Uniform::get ( osg::Vec2 v2) const

◆ get() [31/40]

bool osg::Uniform::get ( osg::Vec2d v2) const

◆ get() [32/40]

bool osg::Uniform::get ( osg::Vec3 v3) const

◆ get() [33/40]

bool osg::Uniform::get ( osg::Vec3d v3) const

◆ get() [34/40]

bool osg::Uniform::get ( osg::Vec4 v4) const

◆ get() [35/40]

bool osg::Uniform::get ( osg::Vec4d v4) const

◆ get() [36/40]

bool osg::Uniform::get ( unsigned int &  ui) const

◆ get() [37/40]

bool osg::Uniform::get ( unsigned int &  ui0,
unsigned int &  ui1 
) const

◆ get() [38/40]

bool osg::Uniform::get ( unsigned int &  ui0,
unsigned int &  ui1,
unsigned int &  ui2 
) const

◆ get() [39/40]

bool osg::Uniform::get ( unsigned int &  ui0,
unsigned int &  ui1,
unsigned int &  ui2,
unsigned int &  ui3 
) const

◆ get() [40/40]

bool osg::Uniform::get ( unsigned long long &  ull) const

◆ getDoubleArray() [1/2]

DoubleArray * osg::Uniform::getDoubleArray ( )
inline

Get the internal data array for a double osg::Uniform.

◆ getDoubleArray() [2/2]

const DoubleArray * osg::Uniform::getDoubleArray ( ) const
inline

◆ getElement() [1/40]

bool osg::Uniform::getElement ( unsigned int  index,
bool &  b 
) const

◆ getElement() [2/40]

bool osg::Uniform::getElement ( unsigned int  index,
bool &  b0,
bool &  b1 
) const

◆ getElement() [3/40]

bool osg::Uniform::getElement ( unsigned int  index,
bool &  b0,
bool &  b1,
bool &  b2 
) const

◆ getElement() [4/40]

bool osg::Uniform::getElement ( unsigned int  index,
bool &  b0,
bool &  b1,
bool &  b2,
bool &  b3 
) const

◆ getElement() [5/40]

bool osg::Uniform::getElement ( unsigned int  index,
double &  d 
) const

◆ getElement() [6/40]

bool osg::Uniform::getElement ( unsigned int  index,
float &  f 
) const

value query for array uniforms

◆ getElement() [7/40]

bool osg::Uniform::getElement ( unsigned int  index,
int &  i 
) const

◆ getElement() [8/40]

bool osg::Uniform::getElement ( unsigned int  index,
int &  i0,
int &  i1 
) const

◆ getElement() [9/40]

bool osg::Uniform::getElement ( unsigned int  index,
int &  i0,
int &  i1,
int &  i2 
) const

◆ getElement() [10/40]

bool osg::Uniform::getElement ( unsigned int  index,
int &  i0,
int &  i1,
int &  i2,
int &  i3 
) const

◆ getElement() [11/40]

bool osg::Uniform::getElement ( unsigned int  index,
long long &  ll 
) const

◆ getElement() [12/40]

bool osg::Uniform::getElement ( unsigned int  index,
osg::Matrix2 m2 
) const

◆ getElement() [13/40]

bool osg::Uniform::getElement ( unsigned int  index,
osg::Matrix2d m2 
) const

◆ getElement() [14/40]

bool osg::Uniform::getElement ( unsigned int  index,
osg::Matrix2x3 m2x3 
) const

◆ getElement() [15/40]

bool osg::Uniform::getElement ( unsigned int  index,
osg::Matrix2x3d m2x3 
) const

◆ getElement() [16/40]

bool osg::Uniform::getElement ( unsigned int  index,
osg::Matrix2x4 m2x4 
) const

◆ getElement() [17/40]

bool osg::Uniform::getElement ( unsigned int  index,
osg::Matrix2x4d m2x4 
) const

◆ getElement() [18/40]

bool osg::Uniform::getElement ( unsigned int  index,
osg::Matrix3 m3 
) const

◆ getElement() [19/40]

bool osg::Uniform::getElement ( unsigned int  index,
osg::Matrix3d m3 
) const

◆ getElement() [20/40]

bool osg::Uniform::getElement ( unsigned int  index,
osg::Matrix3x2 m3x2 
) const

◆ getElement() [21/40]

bool osg::Uniform::getElement ( unsigned int  index,
osg::Matrix3x2d m3x2 
) const

◆ getElement() [22/40]

bool osg::Uniform::getElement ( unsigned int  index,
osg::Matrix3x4 m3x4 
) const

◆ getElement() [23/40]

bool osg::Uniform::getElement ( unsigned int  index,
osg::Matrix3x4d m3x4 
) const

◆ getElement() [24/40]

bool osg::Uniform::getElement ( unsigned int  index,
osg::Matrix4x2 m4x2 
) const

◆ getElement() [25/40]

bool osg::Uniform::getElement ( unsigned int  index,
osg::Matrix4x2d m4x2 
) const

◆ getElement() [26/40]

bool osg::Uniform::getElement ( unsigned int  index,
osg::Matrix4x3 m4x3 
) const

◆ getElement() [27/40]

bool osg::Uniform::getElement ( unsigned int  index,
osg::Matrix4x3d m4x3 
) const

◆ getElement() [28/40]

bool osg::Uniform::getElement ( unsigned int  index,
osg::Matrixd m4 
) const

◆ getElement() [29/40]

bool osg::Uniform::getElement ( unsigned int  index,
osg::Matrixf m4 
) const

◆ getElement() [30/40]

bool osg::Uniform::getElement ( unsigned int  index,
osg::Vec2 v2 
) const

◆ getElement() [31/40]

bool osg::Uniform::getElement ( unsigned int  index,
osg::Vec2d v2 
) const

◆ getElement() [32/40]

bool osg::Uniform::getElement ( unsigned int  index,
osg::Vec3 v3 
) const

◆ getElement() [33/40]

bool osg::Uniform::getElement ( unsigned int  index,
osg::Vec3d v3 
) const

◆ getElement() [34/40]

bool osg::Uniform::getElement ( unsigned int  index,
osg::Vec4 v4 
) const

◆ getElement() [35/40]

bool osg::Uniform::getElement ( unsigned int  index,
osg::Vec4d v4 
) const

◆ getElement() [36/40]

bool osg::Uniform::getElement ( unsigned int  index,
unsigned int &  ui 
) const

◆ getElement() [37/40]

bool osg::Uniform::getElement ( unsigned int  index,
unsigned int &  ui0,
unsigned int &  ui1 
) const

◆ getElement() [38/40]

bool osg::Uniform::getElement ( unsigned int  index,
unsigned int &  ui0,
unsigned int &  ui1,
unsigned int &  ui2 
) const

◆ getElement() [39/40]

bool osg::Uniform::getElement ( unsigned int  index,
unsigned int &  ui0,
unsigned int &  ui1,
unsigned int &  ui2,
unsigned int &  ui3 
) const

◆ getElement() [40/40]

bool osg::Uniform::getElement ( unsigned int  index,
unsigned long long &  ull 
) const

◆ getEventCallback() [1/2]

UniformCallback * osg::Uniform::getEventCallback ( )
inline

Get the non const EventCallback.

◆ getEventCallback() [2/2]

const UniformCallback * osg::Uniform::getEventCallback ( ) const
inline

Get the const EventCallback.

◆ getFloatArray() [1/2]

FloatArray * osg::Uniform::getFloatArray ( )
inline

Get the internal data array for a float osg::Uniform.

◆ getFloatArray() [2/2]

const FloatArray * osg::Uniform::getFloatArray ( ) const
inline

◆ getGlApiType()

static Type osg::Uniform::getGlApiType ( Type  t)
static

Return the GL API type corresponding to a GLSL type

◆ getInt64Array() [1/2]

Int64Array * osg::Uniform::getInt64Array ( )
inline

Get the internal data array for an unsigned int osg::Uniform.

◆ getInt64Array() [2/2]

const Int64Array * osg::Uniform::getInt64Array ( ) const
inline

◆ getIntArray() [1/2]

IntArray * osg::Uniform::getIntArray ( )
inline

Get the internal data array for an int osg::Uniform.

◆ getIntArray() [2/2]

const IntArray * osg::Uniform::getIntArray ( ) const
inline

◆ getInternalArrayNumElements()

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.

◆ getInternalArrayType()

static GLenum osg::Uniform::getInternalArrayType ( Type  t)
static

Return the internal data array type corresponding to a GLSL type

◆ getModifiedCount()

unsigned int osg::Uniform::getModifiedCount ( ) const
inline

◆ getNameID() [1/2]

unsigned int osg::Uniform::getNameID ( ) const

Get the number that the Uniform's name maps to uniquely

◆ getNameID() [2/2]

static unsigned int osg::Uniform::getNameID ( const std::string &  name)
static

Return the number that the name maps to uniquely

◆ getNumElements()

unsigned int osg::Uniform::getNumElements ( ) const
inline

Get the number of GLSL elements of the osg::Uniform (1==scalar)

◆ getNumParents()

unsigned int osg::Uniform::getNumParents ( ) const
inline

Get the number of parents of this Uniform.

Returns
the number of parents of this Uniform.

◆ getParent() [1/2]

StateSet * osg::Uniform::getParent ( unsigned int  i)
inline

◆ getParent() [2/2]

const StateSet * osg::Uniform::getParent ( unsigned int  i) const
inline

Get a single const parent of this Uniform.

Parameters
iindex of the parent to get.
Returns
the parent i.

◆ getParents() [1/2]

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.

◆ getParents() [2/2]

const ParentList & osg::Uniform::getParents ( ) const
inline

Get the parent list of this Uniform.

◆ getType()

Type osg::Uniform::getType ( ) const
inline

Get the type of glUniform as enum.

◆ getTypeId()

static Uniform::Type osg::Uniform::getTypeId ( const std::string &  tname)
static

Return the Type enum of a Uniform typename string

◆ getTypename()

static const char * osg::Uniform::getTypename ( Type  t)
static

Return the name of a Type enum as string.

◆ getTypeNumComponents()

static int osg::Uniform::getTypeNumComponents ( Type  t)
static

Return the number of components for a GLSL type.

◆ getUInt64Array() [1/2]

UInt64Array * osg::Uniform::getUInt64Array ( )
inline

Get the internal data array for an unsigned int osg::Uniform.

◆ getUInt64Array() [2/2]

const UInt64Array * osg::Uniform::getUInt64Array ( ) const
inline

◆ getUIntArray() [1/2]

UIntArray * osg::Uniform::getUIntArray ( )
inline

Get the internal data array for an unsigned int osg::Uniform.

◆ getUIntArray() [2/2]

const UIntArray * osg::Uniform::getUIntArray ( ) const
inline

◆ getUpdateCallback() [1/2]

UniformCallback * osg::Uniform::getUpdateCallback ( )
inline

Get the non const UpdateCallback.

◆ getUpdateCallback() [2/2]

const UniformCallback * osg::Uniform::getUpdateCallback ( ) const
inline

Get the const UpdateCallback.

◆ isCompatibleType() [1/2]

bool osg::Uniform::isCompatibleType ( Type  t) const
protected

◆ isCompatibleType() [2/2]

bool osg::Uniform::isCompatibleType ( Type  t1,
Type  t2 
) const
protected

◆ isScalar()

bool osg::Uniform::isScalar ( ) const
inlineprotected

◆ META_Object()

osg::Uniform::META_Object ( osg  ,
Uniform   
)

◆ operator!=()

bool osg::Uniform::operator!= ( const Uniform rhs) const
inline

◆ operator<()

bool osg::Uniform::operator< ( const Uniform rhs) const
inline

◆ operator=()

Uniform & osg::Uniform::operator= ( const Uniform )
inlineprotected

◆ operator==()

bool osg::Uniform::operator== ( const Uniform rhs) const
inline

◆ removeParent()

void osg::Uniform::removeParent ( osg::StateSet object)
protected

◆ set() [1/40]

bool osg::Uniform::set ( bool  b)

◆ set() [2/40]

bool osg::Uniform::set ( bool  b0,
bool  b1 
)

◆ set() [3/40]

bool osg::Uniform::set ( bool  b0,
bool  b1,
bool  b2 
)

◆ set() [4/40]

bool osg::Uniform::set ( bool  b0,
bool  b1,
bool  b2,
bool  b3 
)

◆ set() [5/40]

bool osg::Uniform::set ( const osg::Matrix2 m2)

◆ set() [6/40]

bool osg::Uniform::set ( const osg::Matrix2d m2)

◆ set() [7/40]

bool osg::Uniform::set ( const osg::Matrix2x3 m2x3)

◆ set() [8/40]

bool osg::Uniform::set ( const osg::Matrix2x3d m2x3)

◆ set() [9/40]

bool osg::Uniform::set ( const osg::Matrix2x4 m2x4)

◆ set() [10/40]

bool osg::Uniform::set ( const osg::Matrix2x4d m2x4)

◆ set() [11/40]

bool osg::Uniform::set ( const osg::Matrix3 m3)

◆ set() [12/40]

bool osg::Uniform::set ( const osg::Matrix3d m3)

◆ set() [13/40]

bool osg::Uniform::set ( const osg::Matrix3x2 m3x2)

◆ set() [14/40]

bool osg::Uniform::set ( const osg::Matrix3x2d m3x2)

◆ set() [15/40]

bool osg::Uniform::set ( const osg::Matrix3x4 m3x4)

◆ set() [16/40]

bool osg::Uniform::set ( const osg::Matrix3x4d m3x4)

◆ set() [17/40]

bool osg::Uniform::set ( const osg::Matrix4x2 m4x2)

◆ set() [18/40]

bool osg::Uniform::set ( const osg::Matrix4x2d m4x2)

◆ set() [19/40]

bool osg::Uniform::set ( const osg::Matrix4x3 m4x3)

◆ set() [20/40]

bool osg::Uniform::set ( const osg::Matrix4x3d m4x3)

◆ set() [21/40]

bool osg::Uniform::set ( const osg::Matrixd m4)

◆ set() [22/40]

bool osg::Uniform::set ( const osg::Matrixf m4)

◆ set() [23/40]

bool osg::Uniform::set ( const osg::Vec2 v2)

◆ set() [24/40]

bool osg::Uniform::set ( const osg::Vec2d v2)

◆ set() [25/40]

bool osg::Uniform::set ( const osg::Vec3 v3)

◆ set() [26/40]

bool osg::Uniform::set ( const osg::Vec3d v3)

◆ set() [27/40]

bool osg::Uniform::set ( const osg::Vec4 v4)

◆ set() [28/40]

bool osg::Uniform::set ( const osg::Vec4d v4)

◆ set() [29/40]

bool osg::Uniform::set ( double  d)

◆ set() [30/40]

bool osg::Uniform::set ( float  f)

convenient scalar (non-array) value assignment

◆ set() [31/40]

bool osg::Uniform::set ( int  i)

◆ set() [32/40]

bool osg::Uniform::set ( int  i0,
int  i1 
)

◆ set() [33/40]

bool osg::Uniform::set ( int  i0,
int  i1,
int  i2 
)

◆ set() [34/40]

bool osg::Uniform::set ( int  i0,
int  i1,
int  i2,
int  i3 
)

◆ set() [35/40]

bool osg::Uniform::set ( long long  ll)

◆ set() [36/40]

bool osg::Uniform::set ( unsigned int  ui)

◆ set() [37/40]

bool osg::Uniform::set ( unsigned int  ui0,
unsigned int  ui1 
)

◆ set() [38/40]

bool osg::Uniform::set ( unsigned int  ui0,
unsigned int  ui1,
unsigned int  ui2 
)

◆ set() [39/40]

bool osg::Uniform::set ( unsigned int  ui0,
unsigned int  ui1,
unsigned int  ui2,
unsigned int  ui3 
)

◆ set() [40/40]

bool osg::Uniform::set ( unsigned long long  ull)

◆ setArray() [1/6]

bool osg::Uniform::setArray ( DoubleArray array)

◆ setArray() [2/6]

bool osg::Uniform::setArray ( FloatArray array)

Set the internal data array for a osg::Uniform

◆ setArray() [3/6]

bool osg::Uniform::setArray ( Int64Array array)

◆ setArray() [4/6]

bool osg::Uniform::setArray ( IntArray array)

◆ setArray() [5/6]

bool osg::Uniform::setArray ( UInt64Array array)

◆ setArray() [6/6]

bool osg::Uniform::setArray ( UIntArray array)

◆ setElement() [1/40]

bool osg::Uniform::setElement ( unsigned int  index,
bool  b 
)

◆ setElement() [2/40]

bool osg::Uniform::setElement ( unsigned int  index,
bool  b0,
bool  b1 
)

◆ setElement() [3/40]

bool osg::Uniform::setElement ( unsigned int  index,
bool  b0,
bool  b1,
bool  b2 
)

◆ setElement() [4/40]

bool osg::Uniform::setElement ( unsigned int  index,
bool  b0,
bool  b1,
bool  b2,
bool  b3 
)

◆ setElement() [5/40]

bool osg::Uniform::setElement ( unsigned int  index,
const osg::Matrix2 m2 
)

◆ setElement() [6/40]

bool osg::Uniform::setElement ( unsigned int  index,
const osg::Matrix2d m2 
)

◆ setElement() [7/40]

bool osg::Uniform::setElement ( unsigned int  index,
const osg::Matrix2x3 m2x3 
)

◆ setElement() [8/40]

bool osg::Uniform::setElement ( unsigned int  index,
const osg::Matrix2x3d m2x3 
)

◆ setElement() [9/40]

bool osg::Uniform::setElement ( unsigned int  index,
const osg::Matrix2x4 m2x4 
)

◆ setElement() [10/40]

bool osg::Uniform::setElement ( unsigned int  index,
const osg::Matrix2x4d m2x4 
)

◆ setElement() [11/40]

bool osg::Uniform::setElement ( unsigned int  index,
const osg::Matrix3 m3 
)

◆ setElement() [12/40]

bool osg::Uniform::setElement ( unsigned int  index,
const osg::Matrix3d m3 
)

◆ setElement() [13/40]

bool osg::Uniform::setElement ( unsigned int  index,
const osg::Matrix3x2 m3x2 
)

◆ setElement() [14/40]

bool osg::Uniform::setElement ( unsigned int  index,
const osg::Matrix3x2d m3x2 
)

◆ setElement() [15/40]

bool osg::Uniform::setElement ( unsigned int  index,
const osg::Matrix3x4 m3x4 
)

◆ setElement() [16/40]

bool osg::Uniform::setElement ( unsigned int  index,
const osg::Matrix3x4d m3x4 
)

◆ setElement() [17/40]

bool osg::Uniform::setElement ( unsigned int  index,
const osg::Matrix4x2 m4x2 
)

◆ setElement() [18/40]

bool osg::Uniform::setElement ( unsigned int  index,
const osg::Matrix4x2d m4x2 
)

◆ setElement() [19/40]

bool osg::Uniform::setElement ( unsigned int  index,
const osg::Matrix4x3 m4x3 
)

◆ setElement() [20/40]

bool osg::Uniform::setElement ( unsigned int  index,
const osg::Matrix4x3d m4x3 
)

◆ setElement() [21/40]

bool osg::Uniform::setElement ( unsigned int  index,
const osg::Matrixd m4 
)

◆ setElement() [22/40]

bool osg::Uniform::setElement ( unsigned int  index,
const osg::Matrixf m4 
)

◆ setElement() [23/40]

bool osg::Uniform::setElement ( unsigned int  index,
const osg::Vec2 v2 
)

◆ setElement() [24/40]

bool osg::Uniform::setElement ( unsigned int  index,
const osg::Vec2d v2 
)

◆ setElement() [25/40]

bool osg::Uniform::setElement ( unsigned int  index,
const osg::Vec3 v3 
)

◆ setElement() [26/40]

bool osg::Uniform::setElement ( unsigned int  index,
const osg::Vec3d v3 
)

◆ setElement() [27/40]

bool osg::Uniform::setElement ( unsigned int  index,
const osg::Vec4 v4 
)

◆ setElement() [28/40]

bool osg::Uniform::setElement ( unsigned int  index,
const osg::Vec4d v4 
)

◆ setElement() [29/40]

bool osg::Uniform::setElement ( unsigned int  index,
double  d 
)

◆ setElement() [30/40]

bool osg::Uniform::setElement ( unsigned int  index,
float  f 
)

value assignment for array uniforms

◆ setElement() [31/40]

bool osg::Uniform::setElement ( unsigned int  index,
int  i 
)

◆ setElement() [32/40]

bool osg::Uniform::setElement ( unsigned int  index,
int  i0,
int  i1 
)

◆ setElement() [33/40]

bool osg::Uniform::setElement ( unsigned int  index,
int  i0,
int  i1,
int  i2 
)

◆ setElement() [34/40]

bool osg::Uniform::setElement ( unsigned int  index,
int  i0,
int  i1,
int  i2,
int  i3 
)

◆ setElement() [35/40]

bool osg::Uniform::setElement ( unsigned int  index,
long long  ll 
)

◆ setElement() [36/40]

bool osg::Uniform::setElement ( unsigned int  index,
unsigned int  ui 
)

◆ setElement() [37/40]

bool osg::Uniform::setElement ( unsigned int  index,
unsigned int  ui0,
unsigned int  ui1 
)

◆ setElement() [38/40]

bool osg::Uniform::setElement ( unsigned int  index,
unsigned int  ui0,
unsigned int  ui1,
unsigned int  ui2 
)

◆ setElement() [39/40]

bool osg::Uniform::setElement ( unsigned int  index,
unsigned int  ui0,
unsigned int  ui1,
unsigned int  ui2,
unsigned int  ui3 
)

◆ setElement() [40/40]

bool osg::Uniform::setElement ( unsigned int  index,
unsigned long long  ull 
)

◆ setEventCallback()

void osg::Uniform::setEventCallback ( UniformCallback ec)

Set the EventCallback which allows users to attach customize the updating of an object during the Event traversal.

◆ setModifiedCount()

void osg::Uniform::setModifiedCount ( unsigned int  mc)
inline

◆ setName()

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.

◆ setNumElements()

void osg::Uniform::setNumElements ( unsigned int  numElements)

Set the length of a uniform, ensuring it is only set once (1==scalar)

◆ setType()

bool osg::Uniform::setType ( Type  t)

Set the type of glUniform, ensuring it is only set once.

◆ setUpdateCallback()

void osg::Uniform::setUpdateCallback ( UniformCallback uc)

Set the UpdateCallback which allows users to attach customize the updating of an object during the update traversal.

Friends And Related Symbol Documentation

◆ osg::StateSet

friend class osg::StateSet
friend

Member Data Documentation

◆ _doubleArray

ref_ptr<DoubleArray> osg::Uniform::_doubleArray
protected

◆ _eventCallback

ref_ptr<UniformCallback> osg::Uniform::_eventCallback
protected

◆ _floatArray

ref_ptr<FloatArray> osg::Uniform::_floatArray
protected

◆ _int64Array

ref_ptr<Int64Array> osg::Uniform::_int64Array
protected

◆ _intArray

ref_ptr<IntArray> osg::Uniform::_intArray
protected

◆ _modifiedCount

unsigned int osg::Uniform::_modifiedCount
protected

◆ _nameID

unsigned int osg::Uniform::_nameID
protected

◆ _numElements

unsigned int osg::Uniform::_numElements
protected

◆ _parents

ParentList osg::Uniform::_parents
protected

◆ _type

Type osg::Uniform::_type
protected

◆ _uint64Array

ref_ptr<UInt64Array> osg::Uniform::_uint64Array
protected

◆ _uintArray

ref_ptr<UIntArray> osg::Uniform::_uintArray
protected

◆ _updateCallback

ref_ptr<UniformCallback> osg::Uniform::_updateCallback
protected

The documentation for this class was generated from the following file: