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, 8 insertions, 9 deletions
diff --git a/linden/indra/llrender/llcubemap.cpp b/linden/indra/llrender/llcubemap.cpp
index a5c677d..e0923e4 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-2009, Linden Research, Inc. 7 * Copyright (c) 2002-2010, 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,6 +63,12 @@ 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;
66} 72}
67 73
68LLCubeMap::~LLCubeMap() 74LLCubeMap::~LLCubeMap()
@@ -75,13 +81,6 @@ void LLCubeMap::initGL()
75 81
76 if (gGLManager.mHasCubeMap && LLCubeMap::sUseCubeMaps) 82 if (gGLManager.mHasCubeMap && LLCubeMap::sUseCubeMaps)
77 { 83 {
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
85 // Not initialized, do stuff. 84 // Not initialized, do stuff.
86 if (mImages[0].isNull()) 85 if (mImages[0].isNull())
87 { 86 {
@@ -94,7 +93,7 @@ void LLCubeMap::initGL()
94 mImages[i] = new LLImageGL(64, 64, 4, (use_cube_mipmaps? TRUE : FALSE)); 93 mImages[i] = new LLImageGL(64, 64, 4, (use_cube_mipmaps? TRUE : FALSE));
95 mImages[i]->setTarget(mTargets[i], LLTexUnit::TT_CUBE_MAP); 94 mImages[i]->setTarget(mTargets[i], LLTexUnit::TT_CUBE_MAP);
96 mRawImages[i] = new LLImageRaw(64, 64, 4); 95 mRawImages[i] = new LLImageRaw(64, 64, 4);
97 mImages[i]->createGLTexture(0, mRawImages[i], texname, TRUE); 96 mImages[i]->createGLTexture(0, mRawImages[i], texname);
98 97
99 gGL.getTexUnit(0)->bindManual(LLTexUnit::TT_CUBE_MAP, texname); 98 gGL.getTexUnit(0)->bindManual(LLTexUnit::TT_CUBE_MAP, texname);
100 mImages[i]->setAddressMode(LLTexUnit::TAM_CLAMP); 99 mImages[i]->setAddressMode(LLTexUnit::TAM_CLAMP);