[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [37008] trunk/blender/source/gameengine/ BlenderRoutines/BL_KetsjiEmbedStart.cpp: Moving the letterbox clear for the embedded player so it only clears when it needs to .

Mitchell Stokes mogurijin at gmail.com
Sun May 29 20:09:39 CEST 2011


Revision: 37008
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=37008
Author:   moguri
Date:     2011-05-29 18:09:38 +0000 (Sun, 29 May 2011)
Log Message:
-----------
Moving the letterbox clear for the embedded player so it only clears when it needs to. Thanks to Juha M?\195?\164ki-Kanto for the tip.

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-29 16:17:43 UTC (rev 37007)
+++ trunk/blender/source/gameengine/BlenderRoutines/BL_KetsjiEmbedStart.cpp	2011-05-29 18:09:38 UTC (rev 37008)
@@ -429,22 +429,22 @@
 				{
 					// first check if we want to exit
 					exitrequested = ketsjiengine->GetExitCode();
-
-					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();
 					
 					if (render)
 					{
+						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);
+						}
+
 						// render the frame
 						ketsjiengine->Render();
 					}




More information about the Bf-blender-cvs mailing list