Several transparent ui-related components were writing to the depthbuffer for some silly reason. Don't do that since it messes with occlusion.

This commit is contained in:
Shyotl
2011-12-30 19:15:21 -06:00
parent 48552e3027
commit dff195d120
5 changed files with 22 additions and 23 deletions

View File

@@ -304,10 +304,6 @@ void LLPostProcess::doEffects(void)
/// Copy the screen buffer to the render texture /// Copy the screen buffer to the render texture
copyFrameBuffer(); copyFrameBuffer();
/// Clear the frame buffer.
//glClearColor(0.0f, 0.0f, 0.0f, 1.0f);
//glClear(GL_COLOR_BUFFER_BIT);
//Disable depth. Set blendmode to replace. //Disable depth. Set blendmode to replace.
LLGLDepthTest depth(GL_FALSE); LLGLDepthTest depth(GL_FALSE);
LLGLEnable blend(GL_BLEND); LLGLEnable blend(GL_BLEND);

View File

@@ -945,7 +945,7 @@ void LLAppViewer::initMaxHeapSize()
if(fnIsWow64Process && fnIsWow64Process(GetCurrentProcess(), &bWow64Process) && bWow64Process) if(fnIsWow64Process && fnIsWow64Process(GetCurrentProcess(), &bWow64Process) && bWow64Process)
{ {
max_heap_size_gb = 3.7; max_heap_size_gb = 3.7f;
} }
else if(ERROR_SUCCESS == RegOpenKey(HKEY_LOCAL_MACHINE, TEXT("SYSTEM\\CurrentControlSet\\Control\\Session Manager\\Memory Management"), &hKey)) else if(ERROR_SUCCESS == RegOpenKey(HKEY_LOCAL_MACHINE, TEXT("SYSTEM\\CurrentControlSet\\Control\\Session Manager\\Memory Management"), &hKey))
{ {
@@ -954,7 +954,7 @@ void LLAppViewer::initMaxHeapSize()
if(ERROR_SUCCESS == RegQueryValueEx(hKey, TEXT("PhysicalAddressExtension"), NULL, NULL, (LPBYTE)&dwResult, &dwSize)) if(ERROR_SUCCESS == RegQueryValueEx(hKey, TEXT("PhysicalAddressExtension"), NULL, NULL, (LPBYTE)&dwResult, &dwSize))
{ {
if(dwResult) if(dwResult)
max_heap_size_gb = 3.7; max_heap_size_gb = 3.7f;
} }
RegCloseKey(hKey); RegCloseKey(hKey);
} }

View File

@@ -441,7 +441,7 @@ void LLViewerParcelMgr::renderRect(const LLVector3d &west_south_bottom_global,
{ {
LLGLSUIDefault gls_ui; LLGLSUIDefault gls_ui;
gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE); gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE);
LLGLDepthTest gls_depth(GL_TRUE); LLGLDepthTest gls_depth(GL_TRUE, GL_FALSE);
LLVector3 west_south_bottom_agent = gAgent.getPosAgentFromGlobal(west_south_bottom_global); LLVector3 west_south_bottom_agent = gAgent.getPosAgentFromGlobal(west_south_bottom_global);
F32 west = west_south_bottom_agent.mV[VX]; F32 west = west_south_bottom_agent.mV[VX];
@@ -698,7 +698,7 @@ void LLViewerParcelMgr::renderHighlightSegments(const U8* segments, LLViewerRegi
LLGLSUIDefault gls_ui; LLGLSUIDefault gls_ui;
gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE); gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE);
LLGLDepthTest gls_depth(GL_TRUE); LLGLDepthTest gls_depth(GL_TRUE, GL_FALSE);
gGL.color4f(1.f, 1.f, 0.f, 0.2f); gGL.color4f(1.f, 1.f, 0.f, 0.2f);
@@ -977,7 +977,7 @@ void LLViewerObjectList::renderObjectBeacons()
{ {
gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE); gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE);
LLGLDepthTest gls_depth(GL_TRUE); LLGLDepthTest gls_depth(GL_TRUE, GL_FALSE);
S32 last_line_width = -1; S32 last_line_width = -1;
// gGL.begin(LLRender::LINES); // Always happens in (line_width != last_line_width) // gGL.begin(LLRender::LINES); // Always happens in (line_width != last_line_width)

View File

@@ -872,7 +872,7 @@ S32 LLViewerParcelOverlay::renderPropertyLines ()
LLGLSUIDefault gls_ui; // called from pipeline LLGLSUIDefault gls_ui; // called from pipeline
gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE); gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE);
LLGLDepthTest mDepthTest(GL_TRUE); LLGLDepthTest mDepthTest(GL_TRUE, GL_FALSE);
// Find camera height off the ground (not from zero) // Find camera height off the ground (not from zero)
F32 ground_height_at_camera = land.resolveHeightGlobal( gAgentCamera.getCameraPositionGlobal() ); F32 ground_height_at_camera = land.resolveHeightGlobal( gAgentCamera.getCameraPositionGlobal() );

View File

@@ -3263,7 +3263,7 @@ void render_hud_elements()
{ {
LLFastTimer t(LLFastTimer::FTM_RENDER_UI); LLFastTimer t(LLFastTimer::FTM_RENDER_UI);
gPipeline.disableLights(); gPipeline.disableLights();
LLGLDisable fog(GL_FOG); LLGLDisable fog(GL_FOG);
LLGLSUIDefault gls_ui; LLGLSUIDefault gls_ui;
@@ -3280,22 +3280,25 @@ void render_hud_elements()
} }
LLGLDepthTest depth(GL_TRUE, GL_FALSE); LLGLDepthTest depth(GL_TRUE, GL_FALSE);
if (!LLPipeline::sReflectionRender && gPipeline.hasRenderDebugFeatureMask(LLPipeline::RENDER_DEBUG_FEATURE_UI)) if (gPipeline.hasRenderDebugFeatureMask(LLPipeline::RENDER_DEBUG_FEATURE_UI))
{ {
static const LLCachedControl<U32> RenderFSAASamples("RenderFSAASamples",0); if(!LLPipeline::sReflectionRender)
LLGLEnable multisample(RenderFSAASamples > 0 ? GL_MULTISAMPLE_ARB : 0); {
gViewerWindow->renderSelections(FALSE, FALSE, FALSE); // For HUD version in render_ui_3d() static const LLCachedControl<U32> RenderFSAASamples("RenderFSAASamples",0);
LLGLEnable multisample(RenderFSAASamples > 0 ? GL_MULTISAMPLE_ARB : 0);
gViewerWindow->renderSelections(FALSE, FALSE, FALSE); // For HUD version in render_ui_3d()
// Draw the tracking overlays // Draw the tracking overlays
LLTracker::render3D(); LLTracker::render3D();
// Show the property lines // Show the property lines
LLWorld::getInstance()->renderPropertyLines(); LLWorld::getInstance()->renderPropertyLines();
LLViewerParcelMgr::getInstance()->render(); LLViewerParcelMgr::getInstance()->render();
LLViewerParcelMgr::getInstance()->renderParcelCollision(); LLViewerParcelMgr::getInstance()->renderParcelCollision();
// Render name tags. // Render name tags.
LLHUDObject::renderAll(); LLHUDObject::renderAll();
}
} }
else if (gForceRenderLandFence) else if (gForceRenderLandFence)
{ {