LLGLSLShader Class Reference

#include <llglslshader.h>

Collaboration diagram for LLGLSLShader:

Collaboration graph
[legend]

List of all members.

Public Types

enum  { SG_DEFAULT = 0, SG_SKY, SG_WATER }

Public Member Functions

 LLGLSLShader ()
void unload ()
BOOL createShader (std::vector< std::string > *attributes, std::vector< std::string > *uniforms)
BOOL attachObject (std::string object)
void attachObject (GLhandleARB object)
void attachObjects (GLhandleARB *objects=NULL, S32 count=0)
BOOL mapAttributes (const std::vector< std::string > *attributes)
BOOL mapUniforms (const std::vector< std::string > *uniforms)
void mapUniform (GLint index, const std::vector< std::string > *uniforms)
void uniform1f (U32 index, GLfloat v)
void uniform2f (U32 index, GLfloat x, GLfloat y)
void uniform3f (U32 index, GLfloat x, GLfloat y, GLfloat z)
void uniform4f (U32 index, GLfloat x, GLfloat y, GLfloat z, GLfloat w)
void uniform1fv (U32 index, U32 count, const GLfloat *v)
void uniform2fv (U32 index, U32 count, const GLfloat *v)
void uniform3fv (U32 index, U32 count, const GLfloat *v)
void uniform4fv (U32 index, U32 count, const GLfloat *v)
void uniform1f (const std::string &uniform, GLfloat v)
void uniform2f (const std::string &uniform, GLfloat x, GLfloat y)
void uniform3f (const std::string &uniform, GLfloat x, GLfloat y, GLfloat z)
void uniform4f (const std::string &uniform, GLfloat x, GLfloat y, GLfloat z, GLfloat w)
void uniform1fv (const std::string &uniform, U32 count, const GLfloat *v)
void uniform2fv (const std::string &uniform, U32 count, const GLfloat *v)
void uniform3fv (const std::string &uniform, U32 count, const GLfloat *v)
void uniform4fv (const std::string &uniform, U32 count, const GLfloat *v)
void uniformMatrix2fv (U32 index, U32 count, GLboolean transpose, const GLfloat *v)
void uniformMatrix3fv (U32 index, U32 count, GLboolean transpose, const GLfloat *v)
void uniformMatrix4fv (U32 index, U32 count, GLboolean transpose, const GLfloat *v)
void uniformMatrix2fv (const std::string &uniform, U32 count, GLboolean transpose, const GLfloat *v)
void uniformMatrix3fv (const std::string &uniform, U32 count, GLboolean transpose, const GLfloat *v)
void uniformMatrix4fv (const std::string &uniform, U32 count, GLboolean transpose, const GLfloat *v)
void vertexAttrib4f (U32 index, GLfloat x, GLfloat y, GLfloat z, GLfloat w)
void vertexAttrib4fv (U32 index, GLfloat *v)
GLint getUniformLocation (const std::string &uniform)
GLint mapUniformTextureChannel (GLint location, GLenum type)
S32 enableTexture (S32 uniform, S32 mode=GL_TEXTURE_2D)
S32 disableTexture (S32 uniform, S32 mode=GL_TEXTURE_2D)
BOOL link (BOOL suppress_errors=FALSE)
void bind ()
void unbind ()

Public Attributes

GLhandleARB mProgramObject
std::vector< GLint > mAttribute
std::vector< GLint > mUniform
std::map< std::string, GLint > mUniformMap
std::map< GLint, LLVector4mValue
std::vector< GLint > mTexture
S32 mActiveTextureChannels
S32 mShaderLevel
S32 mShaderGroup
BOOL mUniformsDirty
LLShaderFeatures mFeatures
std::vector< std::pair
< std::string, GLenum > > 
mShaderFiles
std::string mName


Detailed Description

Definition at line 57 of file llglslshader.h.


Member Enumeration Documentation

anonymous enum

Enumerator:
SG_DEFAULT 
SG_SKY 
SG_WATER 

Definition at line 61 of file llglslshader.h.


Constructor & Destructor Documentation

LLGLSLShader::LLGLSLShader (  ) 

Definition at line 1559 of file llglslshader.cpp.


Member Function Documentation

void LLGLSLShader::unload (  ) 

BOOL LLGLSLShader::createShader ( std::vector< std::string > *  attributes,
std::vector< std::string > *  uniforms 
)

BOOL LLGLSLShader::attachObject ( std::string  object  ) 

Definition at line 1648 of file llglslshader.cpp.

References FALSE, LL_WARNS, mProgramObject, LLShaderMgr::sShaderObjects, stop_glerror, and TRUE.

Referenced by attachObjects(), and LLShaderMgr::attachShaderFeatures().

Here is the caller graph for this function:

void LLGLSLShader::attachObject ( GLhandleARB  object  ) 

Definition at line 1664 of file llglslshader.cpp.

References LL_WARNS, mProgramObject, and stop_glerror.

void LLGLSLShader::attachObjects ( GLhandleARB *  objects = NULL,
S32  count = 0 
)

Definition at line 1678 of file llglslshader.cpp.

References attachObject(), i, and S32.

Here is the call graph for this function:

BOOL LLGLSLShader::mapAttributes ( const std::vector< std::string > *  attributes  ) 

BOOL LLGLSLShader::mapUniforms ( const std::vector< std::string > *  uniforms  ) 

void LLGLSLShader::mapUniform ( GLint  index,
const std::vector< std::string > *  uniforms 
)

void LLGLSLShader::uniform1f ( U32  index,
GLfloat  v 
)

void LLGLSLShader::uniform2f ( U32  index,
GLfloat  x,
GLfloat  y 
)

Definition at line 1906 of file llglslshader.cpp.

References mProgramObject, mUniform, mValue, shouldChange(), and UNIFORM_ERRS.

Referenced by LLPipeline::renderBloom().

Here is the call graph for this function:

Here is the caller graph for this function:

void LLGLSLShader::uniform3f ( U32  index,
GLfloat  x,
GLfloat  y,
GLfloat  z 
)

Definition at line 1929 of file llglslshader.cpp.

References mProgramObject, mUniform, mValue, shouldChange(), and UNIFORM_ERRS.

Referenced by LLPipeline::renderBloom(), and LLDrawPoolWLSky::renderDome().

Here is the call graph for this function:

Here is the caller graph for this function:

void LLGLSLShader::uniform4f ( U32  index,
GLfloat  x,
GLfloat  y,
GLfloat  z,
GLfloat  w 
)

Definition at line 1952 of file llglslshader.cpp.

References mProgramObject, mUniform, mValue, shouldChange(), and UNIFORM_ERRS.

Referenced by LLWaterParamManager::updateShaderUniforms().

Here is the call graph for this function:

Here is the caller graph for this function:

void LLGLSLShader::uniform1fv ( U32  index,
U32  count,
const GLfloat *  v 
)

Definition at line 1975 of file llglslshader.cpp.

References mProgramObject, mUniform, mValue, shouldChange(), and UNIFORM_ERRS.

Here is the call graph for this function:

void LLGLSLShader::uniform2fv ( U32  index,
U32  count,
const GLfloat *  v 
)

Definition at line 1998 of file llglslshader.cpp.

References mProgramObject, mUniform, mValue, shouldChange(), and UNIFORM_ERRS.

Referenced by LLDrawPoolWater::shade().

Here is the call graph for this function:

Here is the caller graph for this function:

void LLGLSLShader::uniform3fv ( U32  index,
U32  count,
const GLfloat *  v 
)

Definition at line 2021 of file llglslshader.cpp.

References mProgramObject, mUniform, mValue, shouldChange(), and UNIFORM_ERRS.

Referenced by LLDrawPoolWater::shade(), LLWLParamManager::updateShaderUniforms(), and LLWaterParamManager::updateShaderUniforms().

Here is the call graph for this function:

Here is the caller graph for this function:

void LLGLSLShader::uniform4fv ( U32  index,
U32  count,
const GLfloat *  v 
)

void LLGLSLShader::uniform1f ( const std::string &  uniform,
GLfloat  v 
)

void LLGLSLShader::uniform2f ( const std::string &  uniform,
GLfloat  x,
GLfloat  y 
)

void LLGLSLShader::uniform3f ( const std::string &  uniform,
GLfloat  x,
GLfloat  y,
GLfloat  z 
)

void LLGLSLShader::uniform4f ( const std::string &  uniform,
GLfloat  x,
GLfloat  y,
GLfloat  z,
GLfloat  w 
)

void LLGLSLShader::uniform1fv ( const std::string &  uniform,
U32  count,
const GLfloat *  v 
)

void LLGLSLShader::uniform2fv ( const std::string &  uniform,
U32  count,
const GLfloat *  v 
)

void LLGLSLShader::uniform3fv ( const std::string &  uniform,
U32  count,
const GLfloat *  v 
)

void LLGLSLShader::uniform4fv ( const std::string &  uniform,
U32  count,
const GLfloat *  v 
)

void LLGLSLShader::uniformMatrix2fv ( U32  index,
U32  count,
GLboolean  transpose,
const GLfloat *  v 
)

Definition at line 2067 of file llglslshader.cpp.

References mProgramObject, mUniform, and UNIFORM_ERRS.

void LLGLSLShader::uniformMatrix3fv ( U32  index,
U32  count,
GLboolean  transpose,
const GLfloat *  v 
)

Definition at line 2084 of file llglslshader.cpp.

References mProgramObject, mUniform, and UNIFORM_ERRS.

void LLGLSLShader::uniformMatrix4fv ( U32  index,
U32  count,
GLboolean  transpose,
const GLfloat *  v 
)

Definition at line 2101 of file llglslshader.cpp.

References mProgramObject, mUniform, and UNIFORM_ERRS.

void LLGLSLShader::uniformMatrix2fv ( const std::string &  uniform,
U32  count,
GLboolean  transpose,
const GLfloat *  v 
)

void LLGLSLShader::uniformMatrix3fv ( const std::string &  uniform,
U32  count,
GLboolean  transpose,
const GLfloat *  v 
)

void LLGLSLShader::uniformMatrix4fv ( const std::string &  uniform,
U32  count,
GLboolean  transpose,
const GLfloat *  v 
)

void LLGLSLShader::vertexAttrib4f ( U32  index,
GLfloat  x,
GLfloat  y,
GLfloat  z,
GLfloat  w 
)

Definition at line 2293 of file llglslshader.cpp.

References mAttribute.

Referenced by LLPipeline::renderHighlights(), and unbind().

Here is the caller graph for this function:

void LLGLSLShader::vertexAttrib4fv ( U32  index,
GLfloat *  v 
)

Definition at line 2301 of file llglslshader.cpp.

References mAttribute.

Referenced by LLDrawPoolAvatar::renderAvatars().

Here is the caller graph for this function:

GLint LLGLSLShader::getUniformLocation ( const std::string &  uniform  ) 

GLint LLGLSLShader::mapUniformTextureChannel ( GLint  location,
GLenum  type 
)

Definition at line 1779 of file llglslshader.cpp.

References LL_DEBUGS, and mActiveTextureChannels.

S32 LLGLSLShader::enableTexture ( S32  uniform,
S32  mode = GL_TEXTURE_2D 
)

S32 LLGLSLShader::disableTexture ( S32  uniform,
S32  mode = GL_TEXTURE_2D 
)

BOOL LLGLSLShader::link ( BOOL  suppress_errors = FALSE  ) 

Definition at line 1820 of file llglslshader.cpp.

References LLShaderMgr::linkProgramObject(), and mProgramObject.

Here is the call graph for this function:

void LLGLSLShader::bind (  ) 

void LLGLSLShader::unbind (  ) 


Member Data Documentation

std::vector<GLint> LLGLSLShader::mAttribute

std::vector<GLint> LLGLSLShader::mUniform

std::map<std::string, GLint> LLGLSLShader::mUniformMap

Definition at line 124 of file llglslshader.h.

std::map<GLint, LLVector4> LLGLSLShader::mValue

std::vector<GLint> LLGLSLShader::mTexture

Definition at line 126 of file llglslshader.h.

Referenced by disableTexture(), enableTexture(), and unload().

Definition at line 127 of file llglslshader.h.

Referenced by mapUniformTextureChannel().

Definition at line 130 of file llglslshader.h.

Referenced by bind().

std::vector< std::pair< std::string, GLenum > > LLGLSLShader::mShaderFiles

std::string LLGLSLShader::mName


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

Generated on Fri May 16 08:48:29 2008 for SecondLife by  doxygen 1.5.5