Revision: 36952 http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=36952 Author: blendix Date: 2011-05-27 16:20:49 +0000 (Fri, 27 May 2011) Log Message: ----------- Attempted fix for #27482: game engine running slow due to revision 36698 which fixed frame colors for letterbox drawing (happens when in camera view).
Cause is unclear, seems some sort of strange graphics driver thing on 32 bit. Changes are a fix for the incorrect usage of glViewport, and avoiding the extra clear if it's not needed. Revision Links: -------------- http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=36698 Modified Paths: -------------- trunk/blender/source/gameengine/BlenderRoutines/BL_KetsjiEmbedStart.cpp Modified: trunk/blender/source/gameengine/BlenderRoutines/BL_KetsjiEmbedStart.cpp =================================================================== --- trunk/blender/source/gameengine/BlenderRoutines/BL_KetsjiEmbedStart.cpp 2011-05-27 13:08:09 UTC (rev 36951) +++ trunk/blender/source/gameengine/BlenderRoutines/BL_KetsjiEmbedStart.cpp 2011-05-27 16:20:49 UTC (rev 36952) @@ -250,10 +250,12 @@ // some blender stuff float camzoom; + int draw_letterbox = 0; if(rv3d->persp==RV3D_CAMOB) { if(startscene->gm.framing.type == SCE_GAMEFRAMING_BARS) { /* Letterbox */ camzoom = 1.0f; + draw_letterbox = 1; } else { camzoom = BKE_screen_view3d_zoom_to_fac(rv3d->camzoom); @@ -428,12 +430,15 @@ // first check if we want to exit exitrequested = ketsjiengine->GetExitCode(); - // Clear screen to border color - // We do this here since we set the canvas to be within the frames. This means the engine - // itself is unaware of the extra space, so we clear the whole region for it. - glClearColor(scene->gm.framing.col[0], scene->gm.framing.col[1], scene->gm.framing.col[2], 1.0f); - glViewport(ar->winrct.xmin, ar->winrct.ymin, ar->winrct.xmax, ar->winrct.ymax); - glClear(GL_COLOR_BUFFER_BIT); + if(draw_letterbox) { + // Clear screen to border color + // We do this here since we set the canvas to be within the frames. This means the engine + // itself is unaware of the extra space, so we clear the whole region for it. + glClearColor(scene->gm.framing.col[0], scene->gm.framing.col[1], scene->gm.framing.col[2], 1.0f); + glViewport(ar->winrct.xmin, ar->winrct.ymin, + ar->winrct.xmax - ar->winrct.xmin, ar->winrct.ymax - ar->winrct.ymin); + glClear(GL_COLOR_BUFFER_BIT); + } // kick the engine bool render = ketsjiengine->NextFrame(); _______________________________________________ Bf-blender-cvs mailing list Bf-blender-cvs@blender.org http://lists.blender.org/mailman/listinfo/bf-blender-cvs