diff options
author | Leslie Linden <leslie@lindenlab.com> | 2011-12-05 09:36:41 -0800 |
---|---|---|
committer | Leslie Linden <leslie@lindenlab.com> | 2011-12-05 09:36:41 -0800 |
commit | 837e4e5165cc3e6595577e90bae240e676be8ffe (patch) | |
tree | 85c8e8a8cb6adf8abc87fe3a70d4513a1ab625e5 /indra/llrender/llcubemap.cpp | |
parent | 570d02dc7e41c3e08477e7f759d632db78690eb4 (diff) | |
parent | 71974461114d81f818f69a4344ce4071c20f331f (diff) |
Merge with viewer-experience
Diffstat (limited to 'indra/llrender/llcubemap.cpp')
-rw-r--r-- | indra/llrender/llcubemap.cpp | 25 |
1 files changed, 13 insertions, 12 deletions
diff --git a/indra/llrender/llcubemap.cpp b/indra/llrender/llcubemap.cpp index 1b10354c22..45a3b18179 100644 --- a/indra/llrender/llcubemap.cpp +++ b/indra/llrender/llcubemap.cpp @@ -36,6 +36,7 @@ #include "m4math.h" #include "llrender.h" +#include "llglslshader.h" #include "llglheaders.h" @@ -195,7 +196,7 @@ void LLCubeMap::enableTexture(S32 stage) void LLCubeMap::enableTextureCoords(S32 stage) { mTextureCoordStage = stage; - if (gGLManager.mHasCubeMap && stage >= 0 && LLCubeMap::sUseCubeMaps) + if (!LLGLSLShader::sNoFixedFunction && gGLManager.mHasCubeMap && stage >= 0 && LLCubeMap::sUseCubeMaps) { if (stage > 0) { @@ -237,7 +238,7 @@ void LLCubeMap::disableTexture(void) void LLCubeMap::disableTextureCoords(void) { - if (gGLManager.mHasCubeMap && mTextureCoordStage >= 0 && LLCubeMap::sUseCubeMaps) + if (!LLGLSLShader::sNoFixedFunction && gGLManager.mHasCubeMap && mTextureCoordStage >= 0 && LLCubeMap::sUseCubeMaps) { if (mTextureCoordStage > 0) { @@ -264,19 +265,19 @@ void LLCubeMap::setMatrix(S32 stage) gGL.getTexUnit(stage)->activate(); } - LLVector3 x(LLVector3d(gGLModelView+0)); - LLVector3 y(LLVector3d(gGLModelView+4)); - LLVector3 z(LLVector3d(gGLModelView+8)); + LLVector3 x(gGLModelView+0); + LLVector3 y(gGLModelView+4); + LLVector3 z(gGLModelView+8); LLMatrix3 mat3; mat3.setRows(x,y,z); LLMatrix4 trans(mat3); trans.transpose(); - glMatrixMode(GL_TEXTURE); - glPushMatrix(); - glLoadMatrixf((F32 *)trans.mMatrix); - glMatrixMode(GL_MODELVIEW); + gGL.matrixMode(LLRender::MM_TEXTURE); + gGL.pushMatrix(); + gGL.loadMatrix((F32 *)trans.mMatrix); + gGL.matrixMode(LLRender::MM_MODELVIEW); /*if (stage > 0) { @@ -292,9 +293,9 @@ void LLCubeMap::restoreMatrix() { gGL.getTexUnit(mMatrixStage)->activate(); } - glMatrixMode(GL_TEXTURE); - glPopMatrix(); - glMatrixMode(GL_MODELVIEW); + gGL.matrixMode(LLRender::MM_TEXTURE); + gGL.popMatrix(); + gGL.matrixMode(LLRender::MM_MODELVIEW); /*if (mMatrixStage > 0) { |