From 7fbbc1b0c6d3760a6116399073775dc56ae831b6 Mon Sep 17 00:00:00 2001 From: prefect Date: Wed, 28 Sep 2005 22:35:08 +0000 Subject: [PATCH] Darken the background of the profile viewer for better readability. This was SVN commit r2798. --- source/ps/ProfileViewer.cpp | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/source/ps/ProfileViewer.cpp b/source/ps/ProfileViewer.cpp index 128d7ed25d..27a115afcf 100644 --- a/source/ps/ProfileViewer.cpp +++ b/source/ps/ProfileViewer.cpp @@ -60,6 +60,21 @@ void RenderProfile() if( !profileVisible ) return; if( !currentNode ) currentNode = g_Profiler.GetRoot(); + int estimate_height; + + estimate_height = 6 + currentNode->GetChildren()->size() + currentNode->GetScriptChildren()->size(); + estimate_height = 20*estimate_height; + + glDisable(GL_TEXTURE_2D); + glColor4ub(0,0,0,128); + glBegin(GL_QUADS); + glVertex2i(0, g_yres); + glVertex2i(660, g_yres); + glVertex2i(660, g_yres-estimate_height); + glVertex2i(0, g_yres-estimate_height); + glEnd(); + glEnable(GL_TEXTURE_2D); + glPushMatrix(); glColor3f(1.0f, 1.0f, 1.0f); @@ -193,4 +208,4 @@ int profilehandler( const SDL_Event* ev ) break; } return( EV_PASS ); -} \ No newline at end of file +}