diff options
author | b1indy <b1indy@b956fd51-792f-4845-bead-9b4dfca2ff2c> | 2007-05-03 20:05:07 +0000 |
---|---|---|
committer | b1indy <b1indy@b956fd51-792f-4845-bead-9b4dfca2ff2c> | 2007-05-03 20:05:07 +0000 |
commit | f38292d6da93cf20c075e4ed74c377819af88091 (patch) | |
tree | 3bbb97790caceddbf051e2603b5713b19e4482bd | |
parent | 0ef472e08a64e5f9b8c33d6b0206a559a56c71ba (diff) | |
download | usdx-f38292d6da93cf20c075e4ed74c377819af88091.tar.gz usdx-f38292d6da93cf20c075e4ed74c377819af88091.tar.xz usdx-f38292d6da93cf20c075e4ed74c377819af88091.zip |
more explanatory error message in case copying the fade texture fails
git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/trunk@162 b956fd51-792f-4845-bead-9b4dfca2ff2c
-rw-r--r-- | Game/Code/Menu/UDisplay.pas | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/Game/Code/Menu/UDisplay.pas b/Game/Code/Menu/UDisplay.pas index ae7f901d..d1d3038d 100644 --- a/Game/Code/Menu/UDisplay.pas +++ b/Game/Code/Menu/UDisplay.pas @@ -104,6 +104,8 @@ var // fade mod
myFade2: Real;
currentTime: Cardinal;
+ glError: glEnum;
+ glErrorStr: String;
// end
begin
Result := True;
@@ -171,10 +173,20 @@ begin ActualScreen.Draw;
glBindTexture(GL_TEXTURE_2D, pTex[S]);
glCopyTexImage2D(GL_TEXTURE_2D, 0, GL_RGB, 0, 0, 512, 512, 0);
- if glGetError <> GL_NO_ERROR then
+ glError:=glGetError;
+ if glError <> GL_NO_ERROR then
begin
canFade := False;
- ScreenPopupError.ShowPopup('Error copying\nfade texture\nfading\ndisabled'); //show error message
+ case glError of
+ GL_INVALID_ENUM: glErrorStr:='INVALID_ENUM';
+ GL_INVALID_VALUE: glErrorStr:='INVALID_VALUE';
+ GL_INVALID_OPERATION: glErrorStr:='INVALID_OPERATION';
+ GL_STACK_OVERFLOW: glErrorStr:='STACK_OVERFLOW';
+ GL_STACK_UNDERFLOW: glErrorStr:='STACK_UNDERFLOW';
+ GL_OUT_OF_MEMORY: glErrorStr:='OUT_OF_MEMORY';
+ else glErrorStr:='unknown error';
+ end;
+ ScreenPopupError.ShowPopup('Error copying\nfade texture\n('+glErrorStr+')\nfading\ndisabled'); //show error message
end;
glViewPort((S-1) * ScreenW div Screens, 0, ScreenW div Screens, ScreenH);
// blackscreen-hack
|