aboutsummaryrefslogtreecommitdiffstats
path: root/src/menu
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/menu
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/menu')
-rw-r--r--src/menu/UMenuBackgroundColor.pas6
-rw-r--r--src/menu/UMenuBackgroundFade.pas10
-rw-r--r--src/menu/UMenuBackgroundNone.pas6
-rw-r--r--src/menu/UMenuBackgroundTexture.pas7
-rw-r--r--src/menu/UMenuBackgroundVideo.pas6
5 files changed, 25 insertions, 10 deletions
diff --git a/src/menu/UMenuBackgroundColor.pas b/src/menu/UMenuBackgroundColor.pas
index 68cf2de4..a5c2a70a 100644
--- a/src/menu/UMenuBackgroundColor.pas
+++ b/src/menu/UMenuBackgroundColor.pas
@@ -52,7 +52,8 @@ type
implementation
uses
gl,
- glext;
+ glext,
+ UGraphic;
constructor TMenuBackgroundColor.Create(const ThemedSettings: TThemeBackground);
begin
@@ -62,8 +63,11 @@ end;
procedure TMenuBackgroundColor.Draw;
begin
+ if (ScreenAct = 1) then
+ begin //just clear once, even when using two screens
glClearColor(Color.R, Color.G, Color.B, 0);
glClear(GL_COLOR_BUFFER_BIT or GL_DEPTH_BUFFER_BIT);
+ end;
end;
end. \ No newline at end of file
diff --git a/src/menu/UMenuBackgroundFade.pas b/src/menu/UMenuBackgroundFade.pas
index b6174738..dc37da45 100644
--- a/src/menu/UMenuBackgroundFade.pas
+++ b/src/menu/UMenuBackgroundFade.pas
@@ -66,7 +66,8 @@ uses sdl,
gl,
glext,
USkins,
- UCommon;
+ UCommon,
+ UGraphic;
constructor TMenuBackgroundFade.Create(const ThemedSettings: TThemeBackground);
var texFilename: string;
@@ -121,7 +122,8 @@ begin
if (UseTexture) then
begin //Draw Texture to Screen
- glClear(GL_DEPTH_BUFFER_BIT);
+ If (ScreenAct = 1) then //Clear just once when in dual screen mode
+ glClear(GL_DEPTH_BUFFER_BIT);
glEnable(GL_TEXTURE_2D);
glEnable(GL_BLEND);
@@ -149,7 +151,9 @@ begin
end
else
begin //Clear Screen w/ progress Alpha + Color
- glClear(GL_DEPTH_BUFFER_BIT);
+ If (ScreenAct = 1) then //Clear just once when in dual screen mode
+ glClear(GL_DEPTH_BUFFER_BIT);
+
glDisable(GL_TEXTURE_2D);
glEnable(GL_BLEND);
glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
diff --git a/src/menu/UMenuBackgroundNone.pas b/src/menu/UMenuBackgroundNone.pas
index 6b63742a..1fccc007 100644
--- a/src/menu/UMenuBackgroundNone.pas
+++ b/src/menu/UMenuBackgroundNone.pas
@@ -52,7 +52,8 @@ type
implementation
uses
gl,
- glext;
+ glext,
+ UGraphic;
constructor TMenuBackgroundNone.Create(const ThemedSettings: TThemeBackground);
begin
@@ -62,7 +63,8 @@ end;
procedure TMenuBackgroundNone.Draw;
begin
//Do just nothing in here!
- glClear(GL_DEPTH_BUFFER_BIT);
+ If (ScreenAct = 1) then //Clear just once when in dual screen mode
+ glClear(GL_DEPTH_BUFFER_BIT);
end;
end. \ No newline at end of file
diff --git a/src/menu/UMenuBackgroundTexture.pas b/src/menu/UMenuBackgroundTexture.pas
index e8678fc5..a1b9e88a 100644
--- a/src/menu/UMenuBackgroundTexture.pas
+++ b/src/menu/UMenuBackgroundTexture.pas
@@ -61,7 +61,8 @@ uses
UCommon,
SysUtils,
gl,
- glext;
+ glext,
+ UGraphic;
constructor TMenuBackgroundTexture.Create(const ThemedSettings: TThemeBackground);
var texFilename: string;
@@ -92,7 +93,9 @@ end;
procedure TMenuBackgroundTexture.Draw;
begin
- glClear(GL_DEPTH_BUFFER_BIT);
+ If (ScreenAct = 1) then //Clear just once when in dual screen mode
+ glClear(GL_DEPTH_BUFFER_BIT);
+
glColorRGB(Color);
glEnable(GL_TEXTURE_2D);
diff --git a/src/menu/UMenuBackgroundVideo.pas b/src/menu/UMenuBackgroundVideo.pas
index 377c2170..d1ce0f09 100644
--- a/src/menu/UMenuBackgroundVideo.pas
+++ b/src/menu/UMenuBackgroundVideo.pas
@@ -105,7 +105,8 @@ uses
SysUtils,
UTime,
USkins,
- UCommon;
+ UCommon,
+ UGraphic;
constructor TMenuBackgroundVideo.Create(const ThemedSettings: TThemeBackground);
begin
@@ -146,7 +147,8 @@ end;
procedure TMenuBackgroundVideo.Draw;
begin
- glClear(GL_DEPTH_BUFFER_BIT);
+ If (ScreenAct = 1) then //Clear just once when in dual screen mode
+ glClear(GL_DEPTH_BUFFER_BIT);
VideoPlayback.GetFrame(VideoBGTimer.GetTime());
// FIXME: why do we draw on screen 2? Seems to be wrong.