aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/llrender/llcubemap.cpp
diff options
context:
space:
mode:
authorJacek Antonelli2009-04-30 13:04:20 -0500
committerJacek Antonelli2009-04-30 13:07:16 -0500
commitca8149ca6d157eb4b5fc8ba0e5ba3a6e56f72e7e (patch)
tree8348301d0ac44a524f1819b777686bf086907d76 /linden/indra/llrender/llcubemap.cpp
parentSecond Life viewer sources 1.22.11 (diff)
downloadmeta-impy-ca8149ca6d157eb4b5fc8ba0e5ba3a6e56f72e7e.zip
meta-impy-ca8149ca6d157eb4b5fc8ba0e5ba3a6e56f72e7e.tar.gz
meta-impy-ca8149ca6d157eb4b5fc8ba0e5ba3a6e56f72e7e.tar.bz2
meta-impy-ca8149ca6d157eb4b5fc8ba0e5ba3a6e56f72e7e.tar.xz
Second Life viewer sources 1.23.0-RC
Diffstat (limited to 'linden/indra/llrender/llcubemap.cpp')
-rw-r--r--linden/indra/llrender/llcubemap.cpp15
1 files changed, 8 insertions, 7 deletions
diff --git a/linden/indra/llrender/llcubemap.cpp b/linden/indra/llrender/llcubemap.cpp
index 60215f0..754d90c 100644
--- a/linden/indra/llrender/llcubemap.cpp
+++ b/linden/indra/llrender/llcubemap.cpp
@@ -17,7 +17,8 @@
17 * There are special exceptions to the terms and conditions of the GPL as 17 * There are special exceptions to the terms and conditions of the GPL as
18 * it is applied to this Source Code. View the full text of the exception 18 * it is applied to this Source Code. View the full text of the exception
19 * in the file doc/FLOSS-exception.txt in this software distribution, or 19 * in the file doc/FLOSS-exception.txt in this software distribution, or
20 * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception 20 * online at
21 * http://secondlifegrid.net/programs/open_source/licensing/flossexception
21 * 22 *
22 * By copying, modifying or distributing this software, you acknowledge 23 * By copying, modifying or distributing this software, you acknowledge
23 * that you have read and understood your obligations described above, 24 * that you have read and understood your obligations described above,
@@ -39,7 +40,6 @@
39#include "v3dmath.h" 40#include "v3dmath.h"
40#include "m3math.h" 41#include "m3math.h"
41#include "m4math.h" 42#include "m4math.h"
42#include "llcamera.h"
43 43
44#include "llrender.h" 44#include "llrender.h"
45 45
@@ -85,9 +85,9 @@ void LLCubeMap::initGL()
85 // Not initialized, do stuff. 85 // Not initialized, do stuff.
86 if (mImages[0].isNull()) 86 if (mImages[0].isNull())
87 { 87 {
88 GLuint texname = 0; 88 U32 texname = 0;
89 89
90 glGenTextures(1, &texname); 90 LLImageGL::generateTextures(1, &texname);
91 91
92 for (int i = 0; i < 6; i++) 92 for (int i = 0; i < 6; i++)
93 { 93 {
@@ -97,9 +97,10 @@ void LLCubeMap::initGL()
97 mImages[i]->createGLTexture(0, mRawImages[i], texname); 97 mImages[i]->createGLTexture(0, mRawImages[i], texname);
98 98
99 gGL.getTexUnit(0)->bindManual(LLTexUnit::TT_CUBE_MAP, texname); 99 gGL.getTexUnit(0)->bindManual(LLTexUnit::TT_CUBE_MAP, texname);
100 mImages[i]->setClampCubemap (TRUE, TRUE, TRUE); 100 mImages[i]->setAddressMode(LLTexUnit::TAM_CLAMP);
101 stop_glerror(); 101 stop_glerror();
102 } 102 }
103 gGL.getTexUnit(0)->disable();
103 } 104 }
104 disable(); 105 disable();
105 } 106 }
@@ -311,8 +312,8 @@ void LLCubeMap::restoreMatrix()
311void LLCubeMap::setReflection (void) 312void LLCubeMap::setReflection (void)
312{ 313{
313 gGL.getTexUnit(mTextureStage)->bindManual(LLTexUnit::TT_CUBE_MAP, getGLName()); 314 gGL.getTexUnit(mTextureStage)->bindManual(LLTexUnit::TT_CUBE_MAP, getGLName());
314 mImages[0]->setMipFilterNearest (FALSE, FALSE); 315 mImages[0]->setFilteringOption(LLTexUnit::TFO_ANISOTROPIC);
315 mImages[0]->setClampCubemap (TRUE, TRUE); 316 mImages[0]->setAddressMode(LLTexUnit::TAM_CLAMP);
316} 317}
317 318
318LLVector3 LLCubeMap::map(U8 side, U16 v_val, U16 h_val) const 319LLVector3 LLCubeMap::map(U8 side, U16 v_val, U16 h_val) const