diff options
Diffstat (limited to '')
-rw-r--r-- | linden/indra/newview/lldynamictexture.cpp | 19 |
1 files changed, 3 insertions, 16 deletions
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 @@ | |||
32 | #include "llviewerprecompiledheaders.h" | 32 | #include "llviewerprecompiledheaders.h" |
33 | 33 | ||
34 | #include "lldynamictexture.h" | 34 | #include "lldynamictexture.h" |
35 | #include "llimagegl.h" | ||
36 | #include "llglheaders.h" | 35 | #include "llglheaders.h" |
37 | #include "llviewerwindow.h" | 36 | #include "llviewerwindow.h" |
38 | #include "llviewercamera.h" | 37 | #include "llviewercamera.h" |
@@ -105,7 +104,7 @@ void LLDynamicTexture::generateGLTexture(LLGLint internal_format, LLGLenum prima | |||
105 | } | 104 | } |
106 | releaseGLTexture(); | 105 | releaseGLTexture(); |
107 | LLPointer<LLImageRaw> raw_image = new LLImageRaw(mWidth, mHeight, mComponents); | 106 | LLPointer<LLImageRaw> raw_image = new LLImageRaw(mWidth, mHeight, mComponents); |
108 | mTexture = new LLImageGL(mWidth, mHeight, mComponents, FALSE); | 107 | mTexture = new LLViewerImage(mWidth, mHeight, mComponents, FALSE); |
109 | if (internal_format >= 0) | 108 | if (internal_format >= 0) |
110 | { | 109 | { |
111 | mTexture->setExplicitFormat(internal_format, primary_format, type_format, swap_bytes); | 110 | mTexture->setExplicitFormat(internal_format, primary_format, type_format, swap_bytes); |
@@ -113,6 +112,7 @@ void LLDynamicTexture::generateGLTexture(LLGLint internal_format, LLGLenum prima | |||
113 | // llinfos << "ALLOCATING " << (mWidth*mHeight*mComponents)/1024 << "K" << llendl; | 112 | // llinfos << "ALLOCATING " << (mWidth*mHeight*mComponents)/1024 << "K" << llendl; |
114 | mTexture->createGLTexture(0, raw_image); | 113 | mTexture->createGLTexture(0, raw_image); |
115 | mTexture->setClamp(mClamp, mClamp); | 114 | mTexture->setClamp(mClamp, mClamp); |
115 | mTexture->setInitialized(false); | ||
116 | } | 116 | } |
117 | 117 | ||
118 | //----------------------------------------------------------------------------- | 118 | //----------------------------------------------------------------------------- |
@@ -144,7 +144,7 @@ void LLDynamicTexture::preRender(BOOL clear_depth) | |||
144 | mOrigin.mY = llmax(mOrigin.mY, 0) ; | 144 | mOrigin.mY = llmax(mOrigin.mY, 0) ; |
145 | } | 145 | } |
146 | 146 | ||
147 | LLImageGL::unbindTexture(0, GL_TEXTURE_2D); | 147 | gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE); |
148 | } | 148 | } |
149 | // Set up camera | 149 | // Set up camera |
150 | mCamera.setOrigin(*LLViewerCamera::getInstance()); | 150 | mCamera.setOrigin(*LLViewerCamera::getInstance()); |
@@ -184,19 +184,6 @@ void LLDynamicTexture::postRender(BOOL success) | |||
184 | } | 184 | } |
185 | 185 | ||
186 | //----------------------------------------------------------------------------- | 186 | //----------------------------------------------------------------------------- |
187 | // bindTexture() | ||
188 | //----------------------------------------------------------------------------- | ||
189 | void LLDynamicTexture::bindTexture() | ||
190 | { | ||
191 | LLViewerImage::bindTexture(mTexture,0); | ||
192 | } | ||
193 | |||
194 | void LLDynamicTexture::unbindTexture() | ||
195 | { | ||
196 | LLImageGL::unbindTexture(0, GL_TEXTURE_2D); | ||
197 | } | ||
198 | |||
199 | //----------------------------------------------------------------------------- | ||
200 | // static | 187 | // static |
201 | // updateDynamicTextures() | 188 | // updateDynamicTextures() |
202 | // Calls update on each dynamic texture. Calls each group in order: "first," then "middle," then "last." | 189 | // Calls update on each dynamic texture. Calls each group in order: "first," then "middle," then "last." |