aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorwhiteshark0 <whiteshark0@b956fd51-792f-4845-bead-9b4dfca2ff2c>2009-03-07 21:42:17 +0000
committerwhiteshark0 <whiteshark0@b956fd51-792f-4845-bead-9b4dfca2ff2c>2009-03-07 21:42:17 +0000
commit486feffb21e42c713fa97a157cf860554be66976 (patch)
treeb1c765de745cee88f87ffbd5d536119b19ea760d /src
parentf469075a0335399c753ae5d2d362047dedf116b1 (diff)
downloadusdx-486feffb21e42c713fa97a157cf860554be66976.tar.gz
usdx-486feffb21e42c713fa97a157cf860554be66976.tar.xz
usdx-486feffb21e42c713fa97a157cf860554be66976.zip
overdrawing of first screen when using visualizations fixed. visualizations are still streched over both screens when UseTexture in UVisualizer is undefined
git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/trunk@1628 b956fd51-792f-4845-bead-9b4dfca2ff2c
Diffstat (limited to 'src')
-rw-r--r--src/media/UVisualizer.pas15
-rw-r--r--src/screens/UScreenSing.pas16
2 files changed, 22 insertions, 9 deletions
diff --git a/src/media/UVisualizer.pas b/src/media/UVisualizer.pas
index 9af6d8c2..37e0268a 100644
--- a/src/media/UVisualizer.pas
+++ b/src/media/UVisualizer.pas
@@ -484,7 +484,11 @@ begin
glMatrixMode(GL_PROJECTION);
glPushMatrix();
glLoadIdentity();
- gluOrtho2D(0, 1, 0, 1);
+ // Use count of screens instead of 1 for the right corner
+ // otherwise we would draw the visualization streched over both screens
+ // another point is that we draw over the at this time drawn first
+ // screen, if Screen = 2
+ gluOrtho2D(0, Screens, 0, 1);
glMatrixMode(GL_MODELVIEW);
glPushMatrix();
glLoadIdentity();
@@ -496,11 +500,12 @@ begin
glColor4f(1, 1, 1, 1);
// draw projectM frame
+ // Screen is 1 to 2. So current screen is from (Screen - 1) to (Screen)
glBegin(GL_QUADS);
- glTexCoord2f(0, 0); glVertex2f(0, 0);
- glTexCoord2f(1, 0); glVertex2f(1, 0);
- glTexCoord2f(1, 1); glVertex2f(1, 1);
- glTexCoord2f(0, 1); glVertex2f(0, 1);
+ glTexCoord2f(0, 0); glVertex2f((Screen - 1), 0);
+ glTexCoord2f(1, 0); glVertex2f(Screen, 0);
+ glTexCoord2f(1, 1); glVertex2f(Screen, 1);
+ glTexCoord2f(0, 1); glVertex2f((Screen - 1), 1);
glEnd();
glDisable(GL_TEXTURE_2D);
diff --git a/src/screens/UScreenSing.pas b/src/screens/UScreenSing.pas
index fcf448a9..ee5164db 100644
--- a/src/screens/UScreenSing.pas
+++ b/src/screens/UScreenSing.pas
@@ -655,6 +655,12 @@ var
begin
Background.Draw;
+ // draw background picture (if any, and if no visualizations)
+ // when we don't check for visualizations the visualizations would
+ // be overdrawn by the picture when {UNDEFINED UseTexture} in UVisualizer
+ if (not fShowVisualization) then
+ SingDrawBackground;
+
// set player names (for 2 screens and only singstar skin)
if ScreenAct = 1 then
begin
@@ -731,15 +737,17 @@ begin
// Note: there is no menu and the animated background brakes the video playback
//DrawBG;
- // draw background
- SingDrawBackground;
-
// update and draw movie
if (ShowFinish and (VideoLoaded or fShowVisualization)) then
begin
if assigned(fCurrentVideoPlaybackEngine) then
begin
- fCurrentVideoPlaybackEngine.GetFrame(CurrentSong.VideoGAP + LyricsState.GetCurrentTime());
+ // Just call this once
+ // when Screens = 2
+ If (ScreenAct = 1) then
+ fCurrentVideoPlaybackEngine.GetFrame(CurrentSong.VideoGAP + LyricsState.GetCurrentTime());
+
+
fCurrentVideoPlaybackEngine.DrawGL(ScreenAct);
end;
end;