diff options
author | Jacek Antonelli | 2008-08-15 23:44:54 -0500 |
---|---|---|
committer | Jacek Antonelli | 2008-08-15 23:44:54 -0500 |
commit | b2afb8800bb033a04bb3ecdf0363068d56648ef1 (patch) | |
tree | 3568129b5bbddb47cd39d622b4137a8fbff4abaf /linden/indra/newview/llcubemap.cpp | |
parent | Second Life viewer sources 1.14.0.1 (diff) | |
download | meta-impy-b2afb8800bb033a04bb3ecdf0363068d56648ef1.zip meta-impy-b2afb8800bb033a04bb3ecdf0363068d56648ef1.tar.gz meta-impy-b2afb8800bb033a04bb3ecdf0363068d56648ef1.tar.bz2 meta-impy-b2afb8800bb033a04bb3ecdf0363068d56648ef1.tar.xz |
Second Life viewer sources 1.15.0.2
Diffstat (limited to 'linden/indra/newview/llcubemap.cpp')
-rw-r--r-- | linden/indra/newview/llcubemap.cpp | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/linden/indra/newview/llcubemap.cpp b/linden/indra/newview/llcubemap.cpp index 415b849..74af3da 100644 --- a/linden/indra/newview/llcubemap.cpp +++ b/linden/indra/newview/llcubemap.cpp | |||
@@ -4,6 +4,7 @@ | |||
4 | * | 4 | * |
5 | * Copyright (c) 2002-2007, Linden Research, Inc. | 5 | * Copyright (c) 2002-2007, Linden Research, Inc. |
6 | * | 6 | * |
7 | * Second Life Viewer Source Code | ||
7 | * The source code in this file ("Source Code") is provided by Linden Lab | 8 | * The source code in this file ("Source Code") is provided by Linden Lab |
8 | * to you under the terms of the GNU General Public License, version 2.0 | 9 | * to you under the terms of the GNU General Public License, version 2.0 |
9 | * ("GPL"), unless you have obtained a separate licensing agreement | 10 | * ("GPL"), unless you have obtained a separate licensing agreement |
@@ -166,6 +167,11 @@ void LLCubeMap::init(const std::vector<LLPointer<LLImageRaw> >& rawimages) | |||
166 | } | 167 | } |
167 | } | 168 | } |
168 | 169 | ||
170 | GLuint LLCubeMap::getGLName() | ||
171 | { | ||
172 | return mImages[0]->getTexName(); | ||
173 | } | ||
174 | |||
169 | void LLCubeMap::bind() | 175 | void LLCubeMap::bind() |
170 | { | 176 | { |
171 | if (gGLManager.mHasCubeMap) | 177 | if (gGLManager.mHasCubeMap) |
@@ -206,7 +212,7 @@ void LLCubeMap::disable() | |||
206 | if (gGLManager.mHasCubeMap && mTextureStage >= 0) | 212 | if (gGLManager.mHasCubeMap && mTextureStage >= 0) |
207 | { | 213 | { |
208 | glActiveTextureARB(GL_TEXTURE0_ARB + mTextureStage); | 214 | glActiveTextureARB(GL_TEXTURE0_ARB + mTextureStage); |
209 | 215 | glBindTexture(GL_TEXTURE_CUBE_MAP_ARB, 0); | |
210 | glDisable(GL_TEXTURE_GEN_S); | 216 | glDisable(GL_TEXTURE_GEN_S); |
211 | glDisable(GL_TEXTURE_GEN_T); | 217 | glDisable(GL_TEXTURE_GEN_T); |
212 | glDisable(GL_TEXTURE_GEN_R); | 218 | glDisable(GL_TEXTURE_GEN_R); |
@@ -219,13 +225,9 @@ void LLCubeMap::setMatrix(S32 stage) | |||
219 | mMatrixStage = stage; | 225 | mMatrixStage = stage; |
220 | glActiveTextureARB(GL_TEXTURE0_ARB+stage); | 226 | glActiveTextureARB(GL_TEXTURE0_ARB+stage); |
221 | 227 | ||
222 | F32 mat[16]; | 228 | LLVector3 x(LLVector3d(gGLModelView+0)); |
223 | 229 | LLVector3 y(LLVector3d(gGLModelView+4)); | |
224 | glGetFloatv(GL_MODELVIEW_MATRIX, mat); | 230 | LLVector3 z(LLVector3d(gGLModelView+8)); |
225 | |||
226 | LLVector3 x(mat); | ||
227 | LLVector3 y(mat+4); | ||
228 | LLVector3 z(mat+8); | ||
229 | 231 | ||
230 | LLMatrix3 mat3; | 232 | LLMatrix3 mat3; |
231 | mat3.setRows(x,y,z); | 233 | mat3.setRows(x,y,z); |