From 16e0d37948cc1137d0c79f48f9b5e12e5bf77686 Mon Sep 17 00:00:00 2001 From: b1indy Date: Sat, 8 Sep 2007 15:33:52 +0000 Subject: did some cleanup and minor modifications UDisplay.pas: tried to make the screenfade-effect transparent (doesn't work for now) UMenu.pas: removed some unnecessary code from DrawBG UGraphic.pas: fixed display of loading screen (after it broke with the modifications in UMenu.pas) git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/trunk@379 b956fd51-792f-4845-bead-9b4dfca2ff2c --- Game/Code/Menu/UDisplay.pas | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'Game/Code/Menu/UDisplay.pas') diff --git a/Game/Code/Menu/UDisplay.pas b/Game/Code/Menu/UDisplay.pas index 0bded712..fcba4382 100644 --- a/Game/Code/Menu/UDisplay.pas +++ b/Game/Code/Menu/UDisplay.pas @@ -75,7 +75,7 @@ begin canFade:=True; // generate texture for fading between screens - GetMem(pTexData, 512*512*3); + GetMem(pTexData, 512*512*4); if pTexData <> NIL then for i:= 1 to 2 do begin @@ -83,7 +83,7 @@ begin if glGetError <> GL_NO_ERROR then canFade := False; glBindTexture(GL_TEXTURE_2D, pTex[i]); if glGetError <> GL_NO_ERROR then canFade := False; - glTexImage2D(GL_TEXTURE_2D, 0, 3, 512, 512, 0, GL_RGB, GL_UNSIGNED_BYTE, pTexData); + glTexImage2D(GL_TEXTURE_2D, 0, 4, 512, 512, 0, GL_RGBA, GL_UNSIGNED_BYTE, pTexData); if glGetError <> GL_NO_ERROR then canFade := False; glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR); if glGetError <> GL_NO_ERROR then canFade := False; @@ -185,7 +185,7 @@ begin glViewPort(0, 0, 512, 512); ActualScreen.Draw; glBindTexture(GL_TEXTURE_2D, pTex[S]); - glCopyTexImage2D(GL_TEXTURE_2D, 0, GL_RGB, 0, 0, 512, 512, 0); + glCopyTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, 0, 0, 512, 512, 0); glError:=glGetError; if glError <> GL_NO_ERROR then begin @@ -229,7 +229,7 @@ begin // blackscreen-hack if not BlackScreen then NextScreen.Draw // draw next screen - else begin + else if ScreenAct=1 then begin glClearColor(0, 0, 0 , 0); glClear(GL_COLOR_BUFFER_BIT or GL_DEPTH_BUFFER_BIT); end; -- cgit v1.2.3