summaryrefslogtreecommitdiff
path: root/indra/newview/lldynamictexture.cpp
diff options
context:
space:
mode:
authorAlexander Gavriliuk <alexandrgproductengine@lindenlab.com>2023-11-30 17:47:58 +0100
committerAlexander Gavriliuk <alexandrgproductengine@lindenlab.com>2023-12-05 03:37:06 +0100
commitc9cd5631e4b149f83c5a49c8fbf869cf2fb5b6a7 (patch)
treed09566a4132530ea65574a886540e0f258103017 /indra/newview/lldynamictexture.cpp
parent54db4206e9302e7510bc4f103ff59714c1be942d (diff)
parent683bf84bb38adc88d4a4b7fedaed89b41fcac45e (diff)
Merge branch 'main' into DRTVWR-489
Diffstat (limited to 'indra/newview/lldynamictexture.cpp')
-rw-r--r--indra/newview/lldynamictexture.cpp35
1 files changed, 5 insertions, 30 deletions
diff --git a/indra/newview/lldynamictexture.cpp b/indra/newview/lldynamictexture.cpp
index 361a7666fa..425acd3392 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);
@@ -195,7 +170,7 @@ void LLViewerDynamicTexture::postRender(BOOL success)
camera->setOrigin(mCamera);
camera->setAxes(mCamera);
camera->setAspect(mCamera.getAspect());
- camera->setView(mCamera.getView());
+ camera->setViewNoBroadcast(mCamera.getView());
camera->setNear(mCamera.getNear());
}
@@ -220,7 +195,7 @@ BOOL LLViewerDynamicTexture::updateAllInstances()
gPipeline.mBake.clear();
}
- LLGLSLShader::bindNoShader();
+ LLGLSLShader::unbind();
LLVertexBuffer::unbind();
BOOL result = FALSE;