summaryrefslogtreecommitdiff
path: root/indra/llrender/llcubemap.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/llrender/llcubemap.cpp')
-rw-r--r--indra/llrender/llcubemap.cpp37
1 files changed, 19 insertions, 18 deletions
diff --git a/indra/llrender/llcubemap.cpp b/indra/llrender/llcubemap.cpp
index fb22d7f1f5..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)
{
@@ -259,47 +260,47 @@ void LLCubeMap::setMatrix(S32 stage)
if (mMatrixStage < 0) return;
- if (stage > 0)
+ //if (stage > 0)
{
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)
+ /*if (stage > 0)
{
gGL.getTexUnit(0)->activate();
- }
+ }*/
}
void LLCubeMap::restoreMatrix()
{
if (mMatrixStage < 0) return;
- if (mMatrixStage > 0)
+ //if (mMatrixStage > 0)
{
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)
+ /*if (mMatrixStage > 0)
{
gGL.getTexUnit(0)->activate();
- }
+ }*/
}
void LLCubeMap::setReflection (void)