#include <llglslshader.h>

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, LLVector4 > | mValue |
| 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 |
Definition at line 57 of file llglslshader.h.
| anonymous enum |
| LLGLSLShader::LLGLSLShader | ( | ) |
Definition at line 1559 of file llglslshader.cpp.
| void LLGLSLShader::unload | ( | ) |
Definition at line 1564 of file llglslshader.cpp.
References i, mAttribute, mProgramObject, mShaderFiles, mTexture, mUniform, and stop_glerror.
Referenced by LLShaderMgr::loadShadersAvatar(), LLShaderMgr::loadShadersDeferred(), LLShaderMgr::loadShadersEffects(), LLShaderMgr::loadShadersEnvironment(), LLShaderMgr::loadShadersInterface(), LLShaderMgr::loadShadersObject(), LLShaderMgr::loadShadersWater(), LLShaderMgr::loadShadersWindLight(), and LLShaderMgr::unloadShaders().

| BOOL LLGLSLShader::createShader | ( | std::vector< std::string > * | attributes, | |
| std::vector< std::string > * | uniforms | |||
| ) |
Referenced by LLShaderMgr::loadShadersAvatar(), LLShaderMgr::loadShadersDeferred(), LLShaderMgr::loadShadersEffects(), LLShaderMgr::loadShadersEnvironment(), LLShaderMgr::loadShadersInterface(), LLShaderMgr::loadShadersObject(), LLShaderMgr::loadShadersWater(), and LLShaderMgr::loadShadersWindLight().

| 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().

| 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.

| 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 | |||
| ) |
Definition at line 1884 of file llglslshader.cpp.
References mProgramObject, mUniform, mValue, and UNIFORM_ERRS.
Referenced by LLDrawPoolSimple::beginRenderPass(), LLDrawPoolSimple::render(), LLPipeline::renderBloom(), LLDrawPoolWater::shade(), LLWLParamManager::updateShaderUniforms(), and LLWaterParamManager::updateShaderUniforms().

| 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().


| 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().


| 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().


Definition at line 1975 of file llglslshader.cpp.
References mProgramObject, mUniform, mValue, shouldChange(), and UNIFORM_ERRS.

Definition at line 1998 of file llglslshader.cpp.
References mProgramObject, mUniform, mValue, shouldChange(), and UNIFORM_ERRS.
Referenced by LLDrawPoolWater::shade().


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().


Definition at line 2044 of file llglslshader.cpp.
References mProgramObject, mUniform, mValue, shouldChange(), and UNIFORM_ERRS.
Referenced by LLDrawPoolBump::beginFullbrightShiny(), LLDrawPoolBump::beginShiny(), LLDrawPoolWater::shade(), LLWLParamSet::update(), LLWLParamManager::updateShaderUniforms(), and LLWaterParamManager::updateShaderUniforms().


| 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().

| void LLGLSLShader::vertexAttrib4fv | ( | U32 | index, | |
| GLfloat * | v | |||
| ) |
Definition at line 2301 of file llglslshader.cpp.
References mAttribute.
Referenced by LLDrawPoolAvatar::renderAvatars().

| GLint LLGLSLShader::getUniformLocation | ( | const std::string & | uniform | ) |
| GLint LLGLSLShader::mapUniformTextureChannel | ( | GLint | location, | |
| GLenum | type | |||
| ) |
Definition at line 1852 of file llglslshader.cpp.
References mTexture, S32, and UNIFORM_ERRS.
Referenced by LLDrawPoolBump::beginFullbrightShiny(), LLDrawPoolBump::beginShiny(), LLDrawPoolAvatar::beginSkinned(), LLDrawPoolTerrain::renderFullShader(), and LLDrawPoolWater::shade().

Definition at line 1868 of file llglslshader.cpp.
References mTexture, S32, and UNIFORM_ERRS.
Referenced by LLDrawPoolBump::endFullbrightShiny(), LLDrawPoolBump::endShiny(), LLDrawPoolAvatar::endSkinned(), LLDrawPoolTerrain::renderFullShader(), and LLDrawPoolWater::shade().

Definition at line 1820 of file llglslshader.cpp.
References LLShaderMgr::linkProgramObject(), and mProgramObject.

| void LLGLSLShader::bind | ( | ) |
Definition at line 1825 of file llglslshader.cpp.
References FALSE, gGLManager, LLWaterParamManager::instance(), LLWLParamManager::instance(), LLGLManager::mHasShaderObjects, mProgramObject, mUniformsDirty, LLWaterParamManager::updateShaderUniforms(), and LLWLParamManager::updateShaderUniforms().
Referenced by LLPostProcess::applyColorFilterShader(), LLPostProcess::applyNightVisionShader(), LLDrawPoolBump::beginFullbrightShiny(), LLDrawPoolTree::beginRenderPass(), LLDrawPoolTerrain::beginRenderPass(), LLDrawPoolSimple::beginRenderPass(), LLDrawPoolAvatar::beginRigid(), LLDrawPoolBump::beginShiny(), LLDrawPoolAvatar::beginSkinned(), LLDrawPoolTerrain::render(), LLDrawPoolSky::render(), LLDrawPoolSimple::render(), LLDrawPoolGlow::render(), LLPipeline::renderBloom(), LLDrawPoolAvatar::renderForSelect(), LLPipeline::renderGeomDeferred(), LLDrawPoolAlpha::renderGroupAlpha(), LLPipeline::renderHighlights(), LLDrawPoolWLSky::renderSkyClouds(), LLDrawPoolWLSky::renderSkyHaze(), and LLDrawPoolWater::shade().


| void LLGLSLShader::unbind | ( | ) |
Definition at line 1840 of file llglslshader.cpp.
References gGLManager, i, mAttribute, LLGLManager::mHasShaderObjects, and vertexAttrib4f().
Referenced by LLPostProcess::applyColorFilterShader(), LLPostProcess::applyNightVisionShader(), LLDrawPoolBump::endFullbrightShiny(), LLDrawPoolTree::endRenderPass(), LLDrawPoolTerrain::endRenderPass(), LLDrawPoolSimple::endRenderPass(), LLDrawPoolAvatar::endRigid(), LLDrawPoolBump::endShiny(), LLDrawPoolAvatar::endSkinned(), LLDrawPoolTerrain::render(), LLDrawPoolGlow::render(), LLPipeline::renderBloom(), LLDrawPoolAvatar::renderForSelect(), LLPipeline::renderGeomDeferred(), LLPipeline::renderHighlights(), LLDrawPoolWLSky::renderSkyClouds(), LLDrawPoolWLSky::renderSkyHaze(), and LLDrawPoolWater::shade().


| GLhandleARB LLGLSLShader::mProgramObject |
Definition at line 121 of file llglslshader.h.
Referenced by LLPostProcess::applyColorFilterShader(), LLPostProcess::applyNightVisionShader(), attachObject(), bind(), LLPipeline::canUseWindLightShaders(), link(), uniform1f(), uniform1fv(), uniform2f(), uniform2fv(), uniform3f(), uniform3fv(), uniform4f(), uniform4fv(), uniformMatrix2fv(), uniformMatrix3fv(), uniformMatrix4fv(), and unload().
| std::vector<GLint> LLGLSLShader::mAttribute |
Definition at line 122 of file llglslshader.h.
Referenced by LLDrawPoolAvatar::beginSkinned(), LLDrawPoolAvatar::endSkinned(), LLDrawPoolAvatar::renderForSelect(), LLVertexBufferAvatar::setupVertexBuffer(), unbind(), unload(), vertexAttrib4f(), and vertexAttrib4fv().
| std::vector<GLint> LLGLSLShader::mUniform |
Definition at line 123 of file llglslshader.h.
Referenced by LLDrawPoolAvatar::renderAvatars(), LLDrawPoolAvatar::renderForSelect(), uniform1f(), uniform1fv(), uniform2f(), uniform2fv(), uniform3f(), uniform3fv(), uniform4f(), uniform4fv(), uniformMatrix2fv(), uniformMatrix3fv(), uniformMatrix4fv(), and unload().
| std::map<std::string, GLint> LLGLSLShader::mUniformMap |
Definition at line 124 of file llglslshader.h.
| std::map<GLint, LLVector4> LLGLSLShader::mValue |
Definition at line 125 of file llglslshader.h.
Referenced by uniform1f(), uniform1fv(), uniform2f(), uniform2fv(), uniform3f(), uniform3fv(), uniform4f(), and uniform4fv().
| std::vector<GLint> LLGLSLShader::mTexture |
Definition at line 126 of file llglslshader.h.
Referenced by disableTexture(), enableTexture(), and unload().
Definition at line 128 of file llglslshader.h.
Referenced by LLDrawPoolTerrain::beginRenderPass(), LLDrawPoolTerrain::endRenderPass(), LLShaderMgr::loadShadersAvatar(), LLShaderMgr::loadShadersDeferred(), LLShaderMgr::loadShadersEffects(), LLShaderMgr::loadShadersEnvironment(), LLShaderMgr::loadShadersInterface(), LLShaderMgr::loadShadersObject(), LLShaderMgr::loadShadersWater(), LLShaderMgr::loadShadersWindLight(), and LLDrawPoolTerrain::render().
Definition at line 129 of file llglslshader.h.
Referenced by LLShaderMgr::loadShadersAvatar(), LLShaderMgr::loadShadersObject(), LLShaderMgr::loadShadersWater(), LLShaderMgr::loadShadersWindLight(), LLWLParamManager::updateShaderUniforms(), and LLWaterParamManager::updateShaderUniforms().
Definition at line 131 of file llglslshader.h.
Referenced by LLShaderMgr::attachShaderFeatures(), LLShaderMgr::loadShadersAvatar(), LLShaderMgr::loadShadersEnvironment(), LLShaderMgr::loadShadersObject(), and LLShaderMgr::loadShadersWater().
| std::vector< std::pair< std::string, GLenum > > LLGLSLShader::mShaderFiles |
Definition at line 132 of file llglslshader.h.
Referenced by LLShaderMgr::loadShadersAvatar(), LLShaderMgr::loadShadersDeferred(), LLShaderMgr::loadShadersEffects(), LLShaderMgr::loadShadersEnvironment(), LLShaderMgr::loadShadersInterface(), LLShaderMgr::loadShadersObject(), LLShaderMgr::loadShadersWater(), LLShaderMgr::loadShadersWindLight(), and unload().
| std::string LLGLSLShader::mName |
Definition at line 133 of file llglslshader.h.
Referenced by LLShaderMgr::loadShadersAvatar(), LLShaderMgr::loadShadersDeferred(), LLShaderMgr::loadShadersEffects(), LLShaderMgr::loadShadersEnvironment(), LLShaderMgr::loadShadersInterface(), LLShaderMgr::loadShadersObject(), LLShaderMgr::loadShadersWater(), and LLShaderMgr::loadShadersWindLight().
1.5.5