From 7abecb48babe6a6f09bf6692ba55076546cfced9 Mon Sep 17 00:00:00 2001 From: Jacek Antonelli Date: Mon, 1 Dec 2008 17:39:58 -0600 Subject: Second Life viewer sources 1.22.0-RC --- linden/indra/newview/lldynamictexture.cpp | 19 +++---------------- 1 file changed, 3 insertions(+), 16 deletions(-) (limited to 'linden/indra/newview/lldynamictexture.cpp') diff --git a/linden/indra/newview/lldynamictexture.cpp b/linden/indra/newview/lldynamictexture.cpp index ad0cdec..9ce4515 100644 --- a/linden/indra/newview/lldynamictexture.cpp +++ b/linden/indra/newview/lldynamictexture.cpp @@ -32,7 +32,6 @@ #include "llviewerprecompiledheaders.h" #include "lldynamictexture.h" -#include "llimagegl.h" #include "llglheaders.h" #include "llviewerwindow.h" #include "llviewercamera.h" @@ -105,7 +104,7 @@ void LLDynamicTexture::generateGLTexture(LLGLint internal_format, LLGLenum prima } releaseGLTexture(); LLPointer raw_image = new LLImageRaw(mWidth, mHeight, mComponents); - mTexture = new LLImageGL(mWidth, mHeight, mComponents, FALSE); + mTexture = new LLViewerImage(mWidth, mHeight, mComponents, FALSE); if (internal_format >= 0) { mTexture->setExplicitFormat(internal_format, primary_format, type_format, swap_bytes); @@ -113,6 +112,7 @@ void LLDynamicTexture::generateGLTexture(LLGLint internal_format, LLGLenum prima // llinfos << "ALLOCATING " << (mWidth*mHeight*mComponents)/1024 << "K" << llendl; mTexture->createGLTexture(0, raw_image); mTexture->setClamp(mClamp, mClamp); + mTexture->setInitialized(false); } //----------------------------------------------------------------------------- @@ -144,7 +144,7 @@ void LLDynamicTexture::preRender(BOOL clear_depth) mOrigin.mY = llmax(mOrigin.mY, 0) ; } - LLImageGL::unbindTexture(0, GL_TEXTURE_2D); + gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE); } // Set up camera mCamera.setOrigin(*LLViewerCamera::getInstance()); @@ -184,19 +184,6 @@ void LLDynamicTexture::postRender(BOOL success) } //----------------------------------------------------------------------------- -// bindTexture() -//----------------------------------------------------------------------------- -void LLDynamicTexture::bindTexture() -{ - LLViewerImage::bindTexture(mTexture,0); -} - -void LLDynamicTexture::unbindTexture() -{ - LLImageGL::unbindTexture(0, GL_TEXTURE_2D); -} - -//----------------------------------------------------------------------------- // static // updateDynamicTextures() // Calls update on each dynamic texture. Calls each group in order: "first," then "middle," then "last." -- cgit v1.1