diff options
author | Paul ProductEngine <pguslisty@productengine.com> | 2011-09-07 16:15:54 +0300 |
---|---|---|
committer | Paul ProductEngine <pguslisty@productengine.com> | 2011-09-07 16:15:54 +0300 |
commit | bb085a45db845a9bfe8aae83ecc7938f618e9ddc (patch) | |
tree | c899b00ec7fec2d91f9443de4a93eb21b4a38170 /indra/llrender/llglslshader.cpp | |
parent | aaee960dd3a2d3da51db6b8ba7a6f5b1f414aef5 (diff) | |
parent | d63b72fb538d4a9dc977eae91d99263355fadef3 (diff) |
Merge from seth_mesh_dev to paul_mesh_dev
Diffstat (limited to 'indra/llrender/llglslshader.cpp')
-rw-r--r-- | indra/llrender/llglslshader.cpp | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/indra/llrender/llglslshader.cpp b/indra/llrender/llglslshader.cpp index 80c93bb0d2..f51d83abe4 100644 --- a/indra/llrender/llglslshader.cpp +++ b/indra/llrender/llglslshader.cpp @@ -49,6 +49,7 @@ using std::make_pair; using std::string; GLhandleARB LLGLSLShader::sCurBoundShader = 0; +LLGLSLShader* LLGLSLShader::sCurBoundShaderPtr = NULL; bool LLGLSLShader::sNoFixedFunction = false; //UI shader -- declared here so llui_libtest will link properly @@ -63,7 +64,8 @@ BOOL shouldChange(const LLVector4& v1, const LLVector4& v2) LLShaderFeatures::LLShaderFeatures() : calculatesLighting(false), isShiny(false), isFullbright(false), hasWaterFog(false), hasTransport(false), hasSkinning(false), hasObjectSkinning(false), hasAtmospherics(false), isSpecular(false), -hasGamma(false), hasLighting(false), calculatesAtmospherics(false), mIndexedTextureChannels(0), disableTextureIndex(false) +hasGamma(false), hasLighting(false), calculatesAtmospherics(false), mIndexedTextureChannels(0), disableTextureIndex(false), +hasAlphaMask(false) { } @@ -386,6 +388,7 @@ void LLGLSLShader::bind() { glUseProgramObjectARB(mProgramObject); sCurBoundShader = mProgramObject; + sCurBoundShaderPtr = this; if (mUniformsDirty) { LLShaderMgr::instance()->updateShaderUniforms(this); @@ -410,6 +413,7 @@ void LLGLSLShader::unbind() } glUseProgramObjectARB(0); sCurBoundShader = 0; + sCurBoundShaderPtr = NULL; stop_glerror(); } } @@ -418,6 +422,7 @@ void LLGLSLShader::bindNoShader(void) { glUseProgramObjectARB(0); sCurBoundShader = 0; + sCurBoundShaderPtr = NULL; } S32 LLGLSLShader::enableTexture(S32 uniform, LLTexUnit::eTextureType mode) @@ -979,3 +984,9 @@ void LLGLSLShader::vertexAttrib4fv(U32 index, GLfloat* v) glVertexAttrib4fvARB(mAttribute[index], v); } } + +void LLGLSLShader::setAlphaRange(F32 minimum, F32 maximum) +{ + uniform1f("minimum_alpha", minimum); + uniform1f("maximum_alpha", maximum); +} |