Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMitchell Stokes <mogurijin@gmail.com>2011-05-29 22:09:38 +0400
committerMitchell Stokes <mogurijin@gmail.com>2011-05-29 22:09:38 +0400
commit221472f7b50914801845ec78cae05d1618bd3c0a (patch)
tree4caf46ce636cb37093419aa25e6b834a52b78493 /source/gameengine
parenta72f101ac8dd6ba84fbc060ab718a343378c3b02 (diff)
Moving the letterbox clear for the embedded player so it only clears when it needs to. Thanks to Juha Mäki-Kanto for the tip.
Diffstat (limited to 'source/gameengine')
-rw-r--r--source/gameengine/BlenderRoutines/BL_KetsjiEmbedStart.cpp20
1 files changed, 10 insertions, 10 deletions
diff --git a/source/gameengine/BlenderRoutines/BL_KetsjiEmbedStart.cpp b/source/gameengine/BlenderRoutines/BL_KetsjiEmbedStart.cpp
index 13f0551d01b..cac801c80ef 100644
--- a/source/gameengine/BlenderRoutines/BL_KetsjiEmbedStart.cpp
+++ b/source/gameengine/BlenderRoutines/BL_KetsjiEmbedStart.cpp
@@ -429,22 +429,22 @@ extern "C" void StartKetsjiShell(struct bContext *C, struct ARegion *ar, rcti *c
{
// 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();
}