Skip to content
Snippets Groups Projects
Commit fb45ca01 authored by Dave Houlton's avatar Dave Houlton
Browse files

SL-13406, cleanup and format changes

parent 21cf868f
No related branches found
No related tags found
No related merge requests found
......@@ -911,28 +911,28 @@ void display(BOOL rebuild, F32 zoom_factor, int subfield, BOOL for_snapshot)
stop_glerror();
gGL.setColorMask(true, true);
if (LLPipeline::sRenderDeferred)
{
gPipeline.mDeferredScreen.bindTarget();
glClearColor(1,0,1,1);
gPipeline.mDeferredScreen.clear();
}
else
{
gPipeline.mScreen.bindTarget();
if (LLPipeline::sUnderWaterRender && !gPipeline.canUseWindLightShaders())
{
const LLColor4 &col = LLEnvironment::instance().getCurrentWater()->getWaterFogColor();
glClearColor(col.mV[0], col.mV[1], col.mV[2], 0.f);
}
gPipeline.mScreen.clear();
}
gGL.setColorMask(true, false);
LLAppViewer::instance()->pingMainloopTimeout("Display:RenderGeom");
gGL.setColorMask(true, true);
if (LLPipeline::sRenderDeferred)
{
gPipeline.mDeferredScreen.bindTarget();
glClearColor(1, 0, 1, 1);
gPipeline.mDeferredScreen.clear();
}
else
{
gPipeline.mScreen.bindTarget();
if (LLPipeline::sUnderWaterRender && !gPipeline.canUseWindLightShaders())
{
const LLColor4 &col = LLEnvironment::instance().getCurrentWater()->getWaterFogColor();
glClearColor(col.mV[0], col.mV[1], col.mV[2], 0.f);
}
gPipeline.mScreen.clear();
}
gGL.setColorMask(true, false);
LLAppViewer::instance()->pingMainloopTimeout("Display:RenderGeom");
if (!(LLAppViewer::instance()->logoutRequestSent() && LLAppViewer::instance()->hasSavedFinalSnapshot())
&& !gRestoreGL)
......@@ -994,20 +994,20 @@ void display(BOOL rebuild, F32 zoom_factor, int subfield, BOOL for_snapshot)
}
}
LLAppViewer::instance()->pingMainloopTimeout("Display:RenderFlush");
LLAppViewer::instance()->pingMainloopTimeout("Display:RenderFlush");
LLRenderTarget &rt = (gPipeline.sRenderDeferred ? gPipeline.mDeferredScreen : gPipeline.mScreen);
rt.flush();
if (rt.sUseFBO)
{
LLRenderTarget::copyContentsToFramebuffer(rt, 0, 0, rt.getWidth(), rt.getHeight(), 0, 0, rt.getWidth(), rt.getHeight(), GL_DEPTH_BUFFER_BIT | GL_STENCIL_BUFFER_BIT, GL_NEAREST);
LLRenderTarget::copyContentsToFramebuffer(rt, 0, 0, rt.getWidth(), rt.getHeight(), 0, 0, rt.getWidth(),
rt.getHeight(), GL_DEPTH_BUFFER_BIT | GL_STENCIL_BUFFER_BIT,
GL_NEAREST);
}
if (LLPipeline::sRenderDeferred)
{
if (LLPipeline::sRenderDeferred)
{
gPipeline.renderDeferredLighting(&gPipeline.mScreen);
}
......@@ -1271,10 +1271,11 @@ void render_ui(F32 zoom_factor, int subfield)
gGL.popMatrix();
}
gPipeline.renderPost(gSnapshot, zoom_factor, subfield);
LL_RECORD_BLOCK_TIME(FTM_RENDER_HUD);
render_hud_elements();
// Finalize scene
gPipeline.renderFinalize();
LL_RECORD_BLOCK_TIME(FTM_RENDER_HUD);
render_hud_elements();
render_hud_attachments();
LLGLSDefault gls_default;
......
This diff is collapsed.
......@@ -139,7 +139,7 @@ class LLPipeline
void resetVertexBuffers(LLDrawable* drawable);
void generateImpostor(LLVOAvatar* avatar);
void bindScreenToTexture();
void renderPost(bool for_snapshot, F32 zoom_factor = 1.f, int subfield = 0);
void renderFinalize();
void init();
void cleanup();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment