From ca8149ca6d157eb4b5fc8ba0e5ba3a6e56f72e7e Mon Sep 17 00:00:00 2001 From: Jacek Antonelli Date: Thu, 30 Apr 2009 13:04:20 -0500 Subject: Second Life viewer sources 1.23.0-RC --- linden/indra/llrender/llcubemap.cpp | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) (limited to 'linden/indra/llrender/llcubemap.cpp') 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 @@ * There are special exceptions to the terms and conditions of the GPL as * it is applied to this Source Code. View the full text of the exception * in the file doc/FLOSS-exception.txt in this software distribution, or - * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception + * online at + * http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, @@ -39,7 +40,6 @@ #include "v3dmath.h" #include "m3math.h" #include "m4math.h" -#include "llcamera.h" #include "llrender.h" @@ -85,9 +85,9 @@ void LLCubeMap::initGL() // Not initialized, do stuff. if (mImages[0].isNull()) { - GLuint texname = 0; + U32 texname = 0; - glGenTextures(1, &texname); + LLImageGL::generateTextures(1, &texname); for (int i = 0; i < 6; i++) { @@ -97,9 +97,10 @@ void LLCubeMap::initGL() mImages[i]->createGLTexture(0, mRawImages[i], texname); gGL.getTexUnit(0)->bindManual(LLTexUnit::TT_CUBE_MAP, texname); - mImages[i]->setClampCubemap (TRUE, TRUE, TRUE); + mImages[i]->setAddressMode(LLTexUnit::TAM_CLAMP); stop_glerror(); } + gGL.getTexUnit(0)->disable(); } disable(); } @@ -311,8 +312,8 @@ void LLCubeMap::restoreMatrix() void LLCubeMap::setReflection (void) { gGL.getTexUnit(mTextureStage)->bindManual(LLTexUnit::TT_CUBE_MAP, getGLName()); - mImages[0]->setMipFilterNearest (FALSE, FALSE); - mImages[0]->setClampCubemap (TRUE, TRUE); + mImages[0]->setFilteringOption(LLTexUnit::TFO_ANISOTROPIC); + mImages[0]->setAddressMode(LLTexUnit::TAM_CLAMP); } LLVector3 LLCubeMap::map(U8 side, U16 v_val, U16 h_val) const -- cgit v1.1