From: DeaDDooMER Date: Thu, 23 Feb 2023 00:20:42 +0000 (+0300) Subject: gl: fix error messages X-Git-Url: http://deadsoftware.ru/gitweb?a=commitdiff_plain;h=4a8853c0301bf982e69e54b551ea91c5cee5136f;p=d2df-sdl.git gl: fix error messages --- diff --git a/src/game/renders/opengl/r_textures.pas b/src/game/renders/opengl/r_textures.pas index 2ddf687..11dfdae 100644 --- a/src/game/renders/opengl/r_textures.pas +++ b/src/game/renders/opengl/r_textures.pas @@ -171,10 +171,12 @@ implementation GL_STACK_OVERFLOW: s := 'GL_STACK_OVERFLOW'; GL_STACK_UNDERFLOW: s := 'GL_STACK_UNDERFLOW'; GL_OUT_OF_MEMORY: s := 'GL_OUT_OF_MEMORY'; - GL_TABLE_TOO_LARGE: s := 'GL_TABLE_TOO_LARGE'; + {$IFNDEF USE_GLES1} + GL_TABLE_TOO_LARGE: s := 'GL_TABLE_TOO_LARGE'; + {$ENDIF} otherwise s := ''; end; - if s = '' then + if s <> '' then e_LogWritefln('%s: %s', [msg, s]) else e_LogWritefln('%s: error code %s', [msg, code]); diff --git a/src/nogl/noGL.pas b/src/nogl/noGL.pas index 5ee98a2..0c67249 100644 --- a/src/nogl/noGL.pas +++ b/src/nogl/noGL.pas @@ -43,6 +43,12 @@ interface const GL_NO_ERROR = 0; + GL_INVALID_ENUM = $0500; + GL_INVALID_VALUE = $0501; + GL_INVALID_OPERATION = $0502; + GL_STACK_OVERFLOW = $0503; + GL_STACK_UNDERFLOW = $0504; + GL_OUT_OF_MEMORY = $0505; GL_NEAREST = $2600; GL_DEPTH_TEST = $0B71; GL_SCISSOR_TEST = $0C11; diff --git a/src/nogl/noGLES1.inc b/src/nogl/noGLES1.inc index 6142e2e..6318e9b 100644 --- a/src/nogl/noGLES1.inc +++ b/src/nogl/noGLES1.inc @@ -10,7 +10,6 @@ implementation GL_TEXTURE_COORD_ARRAY = $8078; GL_TRIANGLES = $0004; GL_TEXTURE0 = $84C0; - GL_INVALID_ENUM = $0500; const ValPerVertex = 2;