diff options
author | whiteshark0 <whiteshark0@b956fd51-792f-4845-bead-9b4dfca2ff2c> | 2009-03-07 21:42:17 +0000 |
---|---|---|
committer | whiteshark0 <whiteshark0@b956fd51-792f-4845-bead-9b4dfca2ff2c> | 2009-03-07 21:42:17 +0000 |
commit | 486feffb21e42c713fa97a157cf860554be66976 (patch) | |
tree | b1c765de745cee88f87ffbd5d536119b19ea760d /src/media | |
parent | f469075a0335399c753ae5d2d362047dedf116b1 (diff) | |
download | usdx-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/media')
-rw-r--r-- | src/media/UVisualizer.pas | 15 |
1 files changed, 10 insertions, 5 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); |