aboutsummaryrefslogtreecommitdiffstats
path: root/src/media
diff options
context:
space:
mode:
authorwhiteshark0 <whiteshark0@b956fd51-792f-4845-bead-9b4dfca2ff2c>2009-03-01 12:53:55 +0000
committerwhiteshark0 <whiteshark0@b956fd51-792f-4845-bead-9b4dfca2ff2c>2009-03-01 12:53:55 +0000
commitf57b5a260d4d98a910f62316efe653a1a7e704b7 (patch)
treefeaae6cb4f6e7ac1a11073a8a4370e8ffb189670 /src/media
parentf96f2467acced6ac12e328c940a818edd74a718b (diff)
downloadusdx-f57b5a260d4d98a910f62316efe653a1a7e704b7.tar.gz
usdx-f57b5a260d4d98a910f62316efe653a1a7e704b7.tar.xz
usdx-f57b5a260d4d98a910f62316efe653a1a7e704b7.zip
fixed first screen was cleared when second screen was drawn. #76 should be fixed now
commented some weird stuff in TScreenSing.Draw git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/trunk@1613 b956fd51-792f-4845-bead-9b4dfca2ff2c
Diffstat (limited to 'src/media')
-rw-r--r--src/media/UVideo.pas14
1 files changed, 12 insertions, 2 deletions
diff --git a/src/media/UVideo.pas b/src/media/UVideo.pas
index 2d3b7620..35f8ab4d 100644
--- a/src/media/UVideo.pas
+++ b/src/media/UVideo.pas
@@ -794,8 +794,18 @@ var
begin
// have a nice black background to draw on
// (even if there were errors opening the vid)
- glClearColor(0, 0, 0, 0);
- glClear(GL_COLOR_BUFFER_BIT or GL_DEPTH_BUFFER_BIT);
+ // TODO: Philipp: IMO TVideoPlayback should not clear the screen at
+ // all, because clearing is already done by the background class
+ // at this moment.
+ if (Screen = 1) then
+ begin
+ // It is important that we just clear once before we start
+ // drawing the first screen otherwise the first screen
+ // would be cleared by the drawgl called when the second
+ // screen is drawn
+ glClearColor(0, 0, 0, 0);
+ glClear(GL_COLOR_BUFFER_BIT or GL_DEPTH_BUFFER_BIT);
+ end;
// exit if there's nothing to draw
if (not fOpened) then