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.cpp33
1 files changed, 4 insertions, 29 deletions
diff --git a/indra/newview/lldynamictexture.cpp b/indra/newview/lldynamictexture.cpp
index 361a7666fa..7fdb3fbdaf 100644
--- a/indra/newview/lldynamictexture.cpp
+++ b/indra/newview/lldynamictexture.cpp
@@ -118,35 +118,10 @@ BOOL LLViewerDynamicTexture::render()
//-----------------------------------------------------------------------------
void LLViewerDynamicTexture::preRender(BOOL clear_depth)
{
- gPipeline.allocatePhysicsBuffer();
- if (!gNonInteractive)
- {
- llassert(mFullWidth <= static_cast<S32>(gPipeline.mPhysicsDisplay.getWidth()));
- llassert(mFullHeight <= static_cast<S32>(gPipeline.mPhysicsDisplay.getHeight()));
- }
-
- if (gPipeline.mPhysicsDisplay.isComplete() && !gGLManager.mIsAMD)
- { //using offscreen render target, just use the bottom left corner
- mOrigin.set(0, 0);
- }
- else
- { // force rendering to on-screen portion of frame buffer
- LLCoordScreen window_pos;
- gViewerWindow->getWindow()->getPosition( &window_pos );
- mOrigin.set(0, gViewerWindow->getWindowHeightRaw() - mFullHeight); // top left corner
-
- if (window_pos.mX < 0)
- {
- mOrigin.mX = -window_pos.mX;
- }
- if (window_pos.mY < 0)
- {
- mOrigin.mY += window_pos.mY;
- mOrigin.mY = llmax(mOrigin.mY, 0) ;
- }
- }
+ //use the bottom left corner
+ mOrigin.set(0, 0);
- gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE);
+ gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE);
// Set up camera
LLViewerCamera* camera = LLViewerCamera::getInstance();
mCamera.setOrigin(*camera);
@@ -220,7 +195,7 @@ BOOL LLViewerDynamicTexture::updateAllInstances()
gPipeline.mBake.clear();
}
- LLGLSLShader::bindNoShader();
+ LLGLSLShader::unbind();
LLVertexBuffer::unbind();
BOOL result = FALSE;