summaryrefslogtreecommitdiff
path: root/indra/newview/lldynamictexture.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/lldynamictexture.cpp')
-rw-r--r--indra/newview/lldynamictexture.cpp19
1 files changed, 3 insertions, 16 deletions
diff --git a/indra/newview/lldynamictexture.cpp b/indra/newview/lldynamictexture.cpp
index d29ac9b43a..f8ba382a74 100644
--- a/indra/newview/lldynamictexture.cpp
+++ b/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<LLImageRaw> 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."