aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authortobigun <tobigun@b956fd51-792f-4845-bead-9b4dfca2ff2c>2008-07-21 10:03:15 +0000
committertobigun <tobigun@b956fd51-792f-4845-bead-9b4dfca2ff2c>2008-07-21 10:03:15 +0000
commit6131e8497f63c2d6d37ab6d545de209d33ef3e44 (patch)
tree8a5f5455d9ac2d619e7ea45d22b7cb2c353b96b7
parentf136a72b7ad12e17d9294978eb43fd4afe90f87e (diff)
downloadusdx-6131e8497f63c2d6d37ab6d545de209d33ef3e44.tar.gz
usdx-6131e8497f63c2d6d37ab6d545de209d33ef3e44.tar.xz
usdx-6131e8497f63c2d6d37ab6d545de209d33ef3e44.zip
usage of glPushAttrib(GL_VIEWPORT_BIT) to save the viewport settings.
git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/trunk@1219 b956fd51-792f-4845-bead-9b4dfca2ff2c
-rw-r--r--Game/Code/Menu/UDisplay.pas7
1 files changed, 5 insertions, 2 deletions
diff --git a/Game/Code/Menu/UDisplay.pas b/Game/Code/Menu/UDisplay.pas
index 953282d7..67eed740 100644
--- a/Game/Code/Menu/UDisplay.pas
+++ b/Game/Code/Menu/UDisplay.pas
@@ -177,7 +177,8 @@ begin
//Create Fading texture if we're just starting
if FadeState = 0 then
begin
- // resize viewport to fit texture
+ // save old viewport and resize to fit texture
+ glPushAttrib(GL_VIEWPORT_BIT);
glViewPort(0, 0, 512, 512);
// draw screen that will be faded
@@ -196,7 +197,9 @@ begin
FadeFailed := true;
Log.LogWarn('Fading disabled: ' + gluErrorString(glError), 'TDisplay.Draw');
end;
- glViewPort((S-1) * ScreenW div Screens, 0, ScreenW div Screens, ScreenH);
+
+ // restore viewport
+ glPopAttrib();
// blackscreen-hack
if not BlackScreen then