aboutsummaryrefslogtreecommitdiffstats
path: root/Game
diff options
context:
space:
mode:
authorb1indy <b1indy@b956fd51-792f-4845-bead-9b4dfca2ff2c>2007-04-15 13:45:17 +0000
committerb1indy <b1indy@b956fd51-792f-4845-bead-9b4dfca2ff2c>2007-04-15 13:45:17 +0000
commit23c69ff32e06a2570641e352ad17f2816ae748f2 (patch)
treefa6f350cf5f99db821d7110436091202d1e30851 /Game
parentda2207c84ce0381968dce817f060407743ea534d (diff)
downloadusdx-23c69ff32e06a2570641e352ad17f2816ae748f2.tar.gz
usdx-23c69ff32e06a2570641e352ad17f2816ae748f2.tar.xz
usdx-23c69ff32e06a2570641e352ad17f2816ae748f2.zip
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
Diffstat (limited to 'Game')
-rw-r--r--Game/Code/Menu/UDisplay.pas13
1 files changed, 7 insertions, 6 deletions
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;