RE_Shader Class Reference

#include <RE_Shader.h>

Inheritance diagram for RE_Shader:

RE_CgShader RE_OGLShader

List of all members.

Public Member Functions

 RE_Shader ()
virtual ~RE_Shader ()
const char * getName ()
int getProgram () const
virtual void applyShader () const =0
virtual void removeShader ()=0
bool loadPrograms (const char *english_name, const char *vtxFile, const char *fragFile, UT_String *messages=NULL)
virtual bool setPrograms (const char *english_name, const char *vtxShader, const char *fragShader, UT_String *messages=NULL)=0
virtual void clearPrograms ()=0
virtual int bindTextureMap (const char *name, const char *tmap, const char *relativeTo)=0
virtual bool bindTextureMap (const char *name, int tex_id, int tex_unit)=0
virtual bool bindVariableInt (const char *name, const int *val, int array_size=1)=0
virtual bool bindVariableInt2 (const char *name, const int *val, int array_size=1)=0
virtual bool bindVariableInt3 (const char *name, const int *val, int array_size=1)=0
virtual bool bindVariableInt4 (const char *name, const int *val, int array_size=1)=0
virtual bool bindVariable1 (const char *name, const float *val, int array_size=1)=0
virtual bool bindVariable2 (const char *name, const float *val, int array_size=1)=0
virtual bool bindVariable3 (const char *name, const float *val, int array_size=1)=0
virtual bool bindVariable4 (const char *name, const float *val, int array_size=1)=0
virtual bool bindMatrix2 (const char *name, const float *val, int array_size=1)=0
virtual bool bindMatrix3 (const char *name, const float *val, int array_size=1)=0
virtual bool bindMatrix4 (const char *name, const float *val, int array_size=1)=0
virtual bool bindUniform (const RE_Uniform *uniform, int index=-1)
bool hasShaderAttribs () const
const UT_StringListgetShaderAttribNames () const
const UT_IntArraygetShaderAttribLocations () const
const UT_IntArraygetShaderAttribSizes () const
virtual void loadShaderTexMaps (RE_Render *)=0
virtual bool hasBuiltInUniform (RE_UniformBuiltIn uniform) const

Static Public Member Functions

static RE_ShadergetShader (int program_object)

Protected Member Functions

virtual int getAttributeIndex (const char *name)
virtual int getUniformIndex (const char *name)
virtual bool loadShaderAttribNames ()=0
virtual bool loadShaderUniformNames ()=0
virtual void registerProgram (int program_object)
virtual void unregisterProgram (int program_object)

Protected Attributes

UT_String myShaderName
int myProgramObject
int myVertexShaderObject
int myFragmentShaderObject
UT_String myVertexShaderSource
UT_String myFragmentShaderSource
UT_StringList myAttribNames
UT_IntArray myAttribLocations
UT_IntArray myAttribSizes
UT_StringList myUniformNames
UT_IntArray myUniformArraySizes
UT_IntArray myUniformTypes
UT_IntArray myBuiltInUniforms

Static Protected Attributes

static UT_HashTable theShaderTable


Detailed Description

Definition at line 34 of file RE_Shader.h.


Constructor & Destructor Documentation

RE_Shader::RE_Shader (  ) 

virtual RE_Shader::~RE_Shader (  )  [virtual]


Member Function Documentation

virtual void RE_Shader::applyShader (  )  const [pure virtual]

Implemented in RE_CgShader, and RE_OGLShader.

virtual bool RE_Shader::bindMatrix2 ( const char *  name,
const float *  val,
int  array_size = 1 
) [pure virtual]

Implemented in RE_CgShader, and RE_OGLShader.

virtual bool RE_Shader::bindMatrix3 ( const char *  name,
const float *  val,
int  array_size = 1 
) [pure virtual]

Implemented in RE_CgShader, and RE_OGLShader.

virtual bool RE_Shader::bindMatrix4 ( const char *  name,
const float *  val,
int  array_size = 1 
) [pure virtual]

Implemented in RE_CgShader, and RE_OGLShader.

virtual bool RE_Shader::bindTextureMap ( const char *  name,
int  tex_id,
int  tex_unit 
) [pure virtual]

Implemented in RE_CgShader, and RE_OGLShader.

virtual int RE_Shader::bindTextureMap ( const char *  name,
const char *  tmap,
const char *  relativeTo 
) [pure virtual]

Implemented in RE_CgShader, and RE_OGLShader.

virtual bool RE_Shader::bindUniform ( const RE_Uniform uniform,
int  index = -1 
) [virtual]

virtual bool RE_Shader::bindVariable1 ( const char *  name,
const float *  val,
int  array_size = 1 
) [pure virtual]

Implemented in RE_CgShader, and RE_OGLShader.

virtual bool RE_Shader::bindVariable2 ( const char *  name,
const float *  val,
int  array_size = 1 
) [pure virtual]

Implemented in RE_CgShader, and RE_OGLShader.

virtual bool RE_Shader::bindVariable3 ( const char *  name,
const float *  val,
int  array_size = 1 
) [pure virtual]

Implemented in RE_CgShader, and RE_OGLShader.

virtual bool RE_Shader::bindVariable4 ( const char *  name,
const float *  val,
int  array_size = 1 
) [pure virtual]

Implemented in RE_CgShader, and RE_OGLShader.

virtual bool RE_Shader::bindVariableInt ( const char *  name,
const int *  val,
int  array_size = 1 
) [pure virtual]

Implemented in RE_CgShader, and RE_OGLShader.

virtual bool RE_Shader::bindVariableInt2 ( const char *  name,
const int *  val,
int  array_size = 1 
) [pure virtual]

Implemented in RE_CgShader, and RE_OGLShader.

virtual bool RE_Shader::bindVariableInt3 ( const char *  name,
const int *  val,
int  array_size = 1 
) [pure virtual]

Implemented in RE_CgShader, and RE_OGLShader.

virtual bool RE_Shader::bindVariableInt4 ( const char *  name,
const int *  val,
int  array_size = 1 
) [pure virtual]

Implemented in RE_CgShader, and RE_OGLShader.

virtual void RE_Shader::clearPrograms (  )  [pure virtual]

Implemented in RE_CgShader, and RE_OGLShader.

virtual int RE_Shader::getAttributeIndex ( const char *  name  )  [protected, virtual]

const char* RE_Shader::getName ( void   )  [inline]

Definition at line 40 of file RE_Shader.h.

int RE_Shader::getProgram (  )  const [inline]

Definition at line 41 of file RE_Shader.h.

static RE_Shader* RE_Shader::getShader ( int  program_object  )  [static]

const UT_IntArray& RE_Shader::getShaderAttribLocations (  )  const [inline]

Definition at line 110 of file RE_Shader.h.

const UT_StringList& RE_Shader::getShaderAttribNames (  )  const [inline]

Definition at line 108 of file RE_Shader.h.

const UT_IntArray& RE_Shader::getShaderAttribSizes (  )  const [inline]

Definition at line 112 of file RE_Shader.h.

virtual int RE_Shader::getUniformIndex ( const char *  name  )  [protected, virtual]

virtual bool RE_Shader::hasBuiltInUniform ( RE_UniformBuiltIn  uniform  )  const [virtual]

bool RE_Shader::hasShaderAttribs (  )  const [inline]

Definition at line 106 of file RE_Shader.h.

bool RE_Shader::loadPrograms ( const char *  english_name,
const char *  vtxFile,
const char *  fragFile,
UT_String messages = NULL 
)

virtual bool RE_Shader::loadShaderAttribNames (  )  [protected, pure virtual]

virtual void RE_Shader::loadShaderTexMaps ( RE_Render  )  [pure virtual]

Implemented in RE_CgShader, and RE_OGLShader.

virtual bool RE_Shader::loadShaderUniformNames (  )  [protected, pure virtual]

virtual void RE_Shader::registerProgram ( int  program_object  )  [protected, virtual]

virtual void RE_Shader::removeShader (  )  [pure virtual]

Implemented in RE_CgShader, and RE_OGLShader.

virtual bool RE_Shader::setPrograms ( const char *  english_name,
const char *  vtxShader,
const char *  fragShader,
UT_String messages = NULL 
) [pure virtual]

Implemented in RE_CgShader, and RE_OGLShader.

virtual void RE_Shader::unregisterProgram ( int  program_object  )  [protected, virtual]


Member Data Documentation

Definition at line 151 of file RE_Shader.h.

Definition at line 150 of file RE_Shader.h.

Definition at line 152 of file RE_Shader.h.

Definition at line 156 of file RE_Shader.h.

Definition at line 147 of file RE_Shader.h.

Definition at line 148 of file RE_Shader.h.

int RE_Shader::myProgramObject [protected]

Definition at line 145 of file RE_Shader.h.

Definition at line 144 of file RE_Shader.h.

Definition at line 154 of file RE_Shader.h.

Definition at line 153 of file RE_Shader.h.

Definition at line 155 of file RE_Shader.h.

Definition at line 147 of file RE_Shader.h.

Definition at line 148 of file RE_Shader.h.

Definition at line 142 of file RE_Shader.h.


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

Generated on Fri May 25 00:10:36 2012 for HDK by  doxygen 1.5.9