Maria GDK 5.0.0.738
Documentation of native code in develop branch
Loading...
Searching...
No Matches
STK::Uniform Class Reference

#include <StkUniform.h>

Public Types

enum  ParameterType {
  UndefParameter , ModelviewMatrix , ProjectionMatrix , TextureUnit0 ,
  TextureUnit1 , TextureUnit2 , TextureUnit3 , EnvironmentMapUnit ,
  LightDirectionEye , LightDirectionWorld , Color , Ambient ,
  Diffuse , Specular , Reflection , Shininess ,
  CSMNumSplits , CSMFarBounds , CSMShadowMapUnit , CSMShadowMapSize ,
  CSMProjMatrix0 , CSMProjMatrix1 , CSMProjMatrix2 , CSMProjMatrix3 ,
  QuadTreeLevel , Morph , TileOrigin , TextureTransform0 ,
  TextureTransform1 , TextureTransform2 , TextureTransform3 , TextureLayerOpacity ,
  NormalMapTransform , NormalMapUnit , NoiseMapUnit , CameraPosition ,
  NormalMatrix , BoneMatrices , InvViewMatrix , ViewportSize ,
  NumParameters
}
 

Public Member Functions

 Uniform (ParameterType ptype)
 
 Uniform (ParameterType ptype, GLint i)
 
 Uniform (ParameterType ptype, GLuint i)
 
 Uniform (ParameterType ptype, int i1, int i2)
 
 Uniform (ParameterType ptype, int i1, int i2, int i3)
 
 Uniform (ParameterType ptype, int i1, int i2, int i3, int i4)
 
 Uniform (ParameterType ptype, float f)
 
 Uniform (ParameterType ptype, float f1, float f2)
 
 Uniform (ParameterType ptype, float f1, float f2, float f3)
 
 Uniform (ParameterType ptype, float f1, float f2, float f3, float f4)
 
 Uniform (ParameterType ptype, int dim, const float *vals)
 
 Uniform (ParameterType ptype, const STK::Matrix4x4f &m)
 
 Uniform (ParameterType ptype, const STK::Color4f &c)
 
 Uniform (ParameterType ptype, const STK::Vector4f &v)
 
 Uniform (ParameterType ptype, const STK::Vector3f &v)
 
 Uniform (ParameterType ptype, const STK::Vector2f &v)
 
 Uniform (const std::string &pname, GLint i)
 
 Uniform (const std::string &pname, GLuint i)
 
 Uniform (const std::string &pname, int i1, int i2)
 
 Uniform (const std::string &pname, int i1, int i2, int i3)
 
 Uniform (const std::string &pname, int i1, int i2, int i3, int i4)
 
 Uniform (const std::string &pname, float f)
 
 Uniform (const std::string &pname, float f1, float f2)
 
 Uniform (const std::string &pname, float f1, float f2, float f3)
 
 Uniform (const std::string &pname, float f1, float f2, float f3, float f4)
 
 Uniform (const std::string &pname, int dim, const float *vals)
 
 Uniform (const std::string &pname, const STK::Matrix4x4f &m)
 
 Uniform (const std::string &pname, const STK::Vector4f &v)
 
 Uniform (const std::string &pname, const STK::Vector3f &v)
 
 Uniform (const std::string &pname, const STK::Vector2f &v)
 
 Uniform (const Uniform &u)
 
 Uniform (Uniform &&u)
 
Uniformoperator= (const Uniform &c)
 
Uniformoperator= (Uniform &&u)
 
const float * floatData () const
 
const int * intData () const
 
bool isFloat () const
 
bool isInteger () const
 
int dimension () const
 
ParameterType getParameterType () const
 
const std::string & getParameterName () const
 
void setValuei (int dim, int *vals)
 
void setValue1i (int i)
 
void setValue2i (int i1, int i2)
 
void setValue3i (int i1, int i2, int i3)
 
void setValue4i (int i1, int i2, int i3, int i4)
 
void setValuef (int dim, const float *vals)
 
void setValue1f (float f)
 
void setValue2f (float f1, float f2)
 
void setValue2fv (float *f)
 
void setValue3f (float f1, float f2, float f3)
 
void setValue3fv (float *f)
 
void setValue4f (float f1, float f2, float f3, float f4)
 
void setValue4fv (float *f)
 
void setValueMatrix4f (const float *arr)
 
void setValueMatrix3f (const float *arr)
 
void setValue (const STK::Matrix4x4f &m)
 
void setValue3x3 (const STK::Matrix4x4f &m)
 
void setValue (const STK::Vector2f &v)
 
void setValue (const STK::Vector3f &v)
 
void setValue (const STK::Vector4f &v)
 
void setValue (const STK::Color4f &c)
 
void copy (const Uniform &u)
 
bool apply (int loc) const
 

Protected Member Functions

void initi (int dim)
 
void initf (int dim)
 
void clear ()
 

Protected Attributes

float * f_ { nullptr }
 
int * i_ { nullptr }
 
int dim_ {0}
 
std::string param_name_
 
ParameterType param_type_ { UndefParameter }
 

Detailed Description

Uniform - Uniform variable for use in shader programs.


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