aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/llrender/llcubemap.cpp
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--linden/indra/llrender/llcubemap.cpp17
1 files changed, 9 insertions, 8 deletions
diff --git a/linden/indra/llrender/llcubemap.cpp b/linden/indra/llrender/llcubemap.cpp
index e0923e4..a5c677d 100644
--- a/linden/indra/llrender/llcubemap.cpp
+++ b/linden/indra/llrender/llcubemap.cpp
@@ -4,7 +4,7 @@
4 * 4 *
5 * $LicenseInfo:firstyear=2002&license=viewergpl$ 5 * $LicenseInfo:firstyear=2002&license=viewergpl$
6 * 6 *
7 * Copyright (c) 2002-2010, Linden Research, Inc. 7 * Copyright (c) 2002-2009, Linden Research, Inc.
8 * 8 *
9 * Second Life Viewer Source Code 9 * Second Life Viewer Source Code
10 * The source code in this file ("Source Code") is provided by Linden Lab 10 * The source code in this file ("Source Code") is provided by Linden Lab
@@ -63,12 +63,6 @@ LLCubeMap::LLCubeMap()
63 mTextureCoordStage(0), 63 mTextureCoordStage(0),
64 mMatrixStage(0) 64 mMatrixStage(0)
65{ 65{
66 mTargets[0] = GL_TEXTURE_CUBE_MAP_NEGATIVE_X_ARB;
67 mTargets[1] = GL_TEXTURE_CUBE_MAP_POSITIVE_X_ARB;
68 mTargets[2] = GL_TEXTURE_CUBE_MAP_NEGATIVE_Y_ARB;
69 mTargets[3] = GL_TEXTURE_CUBE_MAP_POSITIVE_Y_ARB;
70 mTargets[4] = GL_TEXTURE_CUBE_MAP_NEGATIVE_Z_ARB;
71 mTargets[5] = GL_TEXTURE_CUBE_MAP_POSITIVE_Z_ARB;
72} 66}
73 67
74LLCubeMap::~LLCubeMap() 68LLCubeMap::~LLCubeMap()
@@ -81,6 +75,13 @@ void LLCubeMap::initGL()
81 75
82 if (gGLManager.mHasCubeMap && LLCubeMap::sUseCubeMaps) 76 if (gGLManager.mHasCubeMap && LLCubeMap::sUseCubeMaps)
83 { 77 {
78 mTargets[0] = GL_TEXTURE_CUBE_MAP_NEGATIVE_X_ARB;
79 mTargets[1] = GL_TEXTURE_CUBE_MAP_POSITIVE_X_ARB;
80 mTargets[2] = GL_TEXTURE_CUBE_MAP_NEGATIVE_Y_ARB;
81 mTargets[3] = GL_TEXTURE_CUBE_MAP_POSITIVE_Y_ARB;
82 mTargets[4] = GL_TEXTURE_CUBE_MAP_NEGATIVE_Z_ARB;
83 mTargets[5] = GL_TEXTURE_CUBE_MAP_POSITIVE_Z_ARB;
84
84 // Not initialized, do stuff. 85 // Not initialized, do stuff.
85 if (mImages[0].isNull()) 86 if (mImages[0].isNull())
86 { 87 {
@@ -93,7 +94,7 @@ void LLCubeMap::initGL()
93 mImages[i] = new LLImageGL(64, 64, 4, (use_cube_mipmaps? TRUE : FALSE)); 94 mImages[i] = new LLImageGL(64, 64, 4, (use_cube_mipmaps? TRUE : FALSE));
94 mImages[i]->setTarget(mTargets[i], LLTexUnit::TT_CUBE_MAP); 95 mImages[i]->setTarget(mTargets[i], LLTexUnit::TT_CUBE_MAP);
95 mRawImages[i] = new LLImageRaw(64, 64, 4); 96 mRawImages[i] = new LLImageRaw(64, 64, 4);
96 mImages[i]->createGLTexture(0, mRawImages[i], texname); 97 mImages[i]->createGLTexture(0, mRawImages[i], texname, TRUE);
97 98
98 gGL.getTexUnit(0)->bindManual(LLTexUnit::TT_CUBE_MAP, texname); 99 gGL.getTexUnit(0)->bindManual(LLTexUnit::TT_CUBE_MAP, texname);
99 mImages[i]->setAddressMode(LLTexUnit::TAM_CLAMP); 100 mImages[i]->setAddressMode(LLTexUnit::TAM_CLAMP);