From 23c69ff32e06a2570641e352ad17f2816ae748f2 Mon Sep 17 00:00:00 2001 From: b1indy Date: Sun, 15 Apr 2007 13:45:17 +0000 Subject: re-inserted some code to set clear-color to white per default or to black via commandline switch (affects whole classic theme and singscreen in deluxe theme) git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/trunk@95 b956fd51-792f-4845-bead-9b4dfca2ff2c --- Game/Code/Menu/UDisplay.pas | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'Game/Code/Menu/UDisplay.pas') diff --git a/Game/Code/Menu/UDisplay.pas b/Game/Code/Menu/UDisplay.pas index 876fb6b6..b6489c70 100644 --- a/Game/Code/Menu/UDisplay.pas +++ b/Game/Code/Menu/UDisplay.pas @@ -46,14 +46,14 @@ begin myfade:=0; doFade:=True; // generate texture for fading between screens - GetMem(pTexData, 1024*1024*4); + GetMem(pTexData, 1024*1024*3); if pTexData <> NIL then begin glGenTextures(1, pTex); if glGetError <> GL_NO_ERROR then doFade := False; glBindTexture(GL_TEXTURE_2D, pTex); if glGetError <> GL_NO_ERROR then doFade := False; - glTexImage2D(GL_TEXTURE_2D, 0, 3, 1024, 1024, 0, GL_RGBA, GL_UNSIGNED_BYTE, pTexData); + glTexImage2D(GL_TEXTURE_2D, 0, 3, 1024, 1024, 0, GL_RGB, GL_UNSIGNED_BYTE, pTexData); if glGetError <> GL_NO_ERROR then doFade := False; glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR); if glGetError <> GL_NO_ERROR then doFade := False; @@ -81,6 +81,7 @@ end; function TDisplay.Draw: Boolean; var S: integer; + Col: Real; // fade mod myFade2:integer; currentTime: Cardinal; @@ -88,11 +89,11 @@ var begin Result := True; -{ Col := 1; + Col := 1; if (ParamStr(1) = '-black') or (ParamStr(1) = '-fsblack') then - Col := 0;} + Col := 0; - glClearColor(0, 0, 0 , 0); + glClearColor(Col, Col, Col , 0); glClear(GL_COLOR_BUFFER_BIT or GL_DEPTH_BUFFER_BIT); for S := 1 to Screens do begin @@ -124,7 +125,7 @@ begin begin ActualScreen.Draw; glBindTexture(GL_TEXTURE_2D, pTex); - glCopyTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, 0, 0, 1024, 1024, 0); + glCopyTexImage2D(GL_TEXTURE_2D, 0, GL_RGB, 0, 0, 1024, 1024, 0); if glGetError <> GL_NO_ERROR then begin doFade := False; -- cgit v1.2.3