aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/newview/llcubemap.cpp
diff options
context:
space:
mode:
authorJacek Antonelli2008-08-15 23:45:07 -0500
committerJacek Antonelli2008-08-15 23:45:07 -0500
commit8465910c79b8e746e04fd581cca2d60399e569b9 (patch)
treef43fec3e83c46e0d6190dca923d6fb268b52ffdd /linden/indra/newview/llcubemap.cpp
parentSecond Life viewer sources 1.18.2.1 (diff)
downloadmeta-impy-8465910c79b8e746e04fd581cca2d60399e569b9.zip
meta-impy-8465910c79b8e746e04fd581cca2d60399e569b9.tar.gz
meta-impy-8465910c79b8e746e04fd581cca2d60399e569b9.tar.bz2
meta-impy-8465910c79b8e746e04fd581cca2d60399e569b9.tar.xz
Second Life viewer sources 1.18.3.2-RC
Diffstat (limited to 'linden/indra/newview/llcubemap.cpp')
-rw-r--r--linden/indra/newview/llcubemap.cpp17
1 files changed, 13 insertions, 4 deletions
diff --git a/linden/indra/newview/llcubemap.cpp b/linden/indra/newview/llcubemap.cpp
index 74af3da..ff8f7c3 100644
--- a/linden/indra/newview/llcubemap.cpp
+++ b/linden/indra/newview/llcubemap.cpp
@@ -27,6 +27,7 @@
27 */ 27 */
28 28
29#include "llviewerprecompiledheaders.h" 29#include "llviewerprecompiledheaders.h"
30#include "llfeaturemanager.h"
30#include "llworkerthread.h" 31#include "llworkerthread.h"
31 32
32#include "llcubemap.h" 33#include "llcubemap.h"
@@ -65,7 +66,8 @@ void LLCubeMap::initGL()
65{ 66{
66 llassert(gGLManager.mInited); 67 llassert(gGLManager.mInited);
67 68
68 if (gGLManager.mHasCubeMap) 69 if (gGLManager.mHasCubeMap
70 && gFeatureManagerp->isFeatureAvailable("RenderCubeMap"))
69 { 71 {
70 mTargets[0] = GL_TEXTURE_CUBE_MAP_NEGATIVE_X_ARB; 72 mTargets[0] = GL_TEXTURE_CUBE_MAP_NEGATIVE_X_ARB;
71 mTargets[1] = GL_TEXTURE_CUBE_MAP_POSITIVE_X_ARB; 73 mTargets[1] = GL_TEXTURE_CUBE_MAP_POSITIVE_X_ARB;
@@ -174,7 +176,9 @@ GLuint LLCubeMap::getGLName()
174 176
175void LLCubeMap::bind() 177void LLCubeMap::bind()
176{ 178{
177 if (gGLManager.mHasCubeMap) 179 if (gGLManager.mHasCubeMap
180 //&& gFeatureManagerp->isFeatureAvailable("RenderCubeMap")
181 )
178 { 182 {
179 // We assume that if they have cube mapping, they have multitexturing. 183 // We assume that if they have cube mapping, they have multitexturing.
180 glEnable(GL_TEXTURE_CUBE_MAP_ARB); 184 glEnable(GL_TEXTURE_CUBE_MAP_ARB);
@@ -192,7 +196,10 @@ void LLCubeMap::bind()
192void LLCubeMap::enable(S32 stage) 196void LLCubeMap::enable(S32 stage)
193{ 197{
194 mTextureStage = stage; 198 mTextureStage = stage;
195 if (gGLManager.mHasCubeMap && stage >= 0) 199 if (gGLManager.mHasCubeMap &&
200 stage >= 0
201 //&& gFeatureManagerp->isFeatureAvailable("RenderCubeMap")
202 )
196 { 203 {
197 glActiveTextureARB(GL_TEXTURE0_ARB + stage); // NOTE: leaves texture stage set 204 glActiveTextureARB(GL_TEXTURE0_ARB + stage); // NOTE: leaves texture stage set
198 205
@@ -209,7 +216,9 @@ void LLCubeMap::enable(S32 stage)
209 216
210void LLCubeMap::disable() 217void LLCubeMap::disable()
211{ 218{
212 if (gGLManager.mHasCubeMap && mTextureStage >= 0) 219 if (gGLManager.mHasCubeMap && mTextureStage >= 0
220 //&& gFeatureManagerp->isFeatureAvailable("RenderCubeMap")
221 )
213 { 222 {
214 glActiveTextureARB(GL_TEXTURE0_ARB + mTextureStage); 223 glActiveTextureARB(GL_TEXTURE0_ARB + mTextureStage);
215 glBindTexture(GL_TEXTURE_CUBE_MAP_ARB, 0); 224 glBindTexture(GL_TEXTURE_CUBE_MAP_ARB, 0);