From ad4d1229d57256d453dc143c21d762516e25df4f Mon Sep 17 00:00:00 2001 From: Rod Kay Date: Wed, 30 Apr 2025 12:19:08 +1000 Subject: [PATCH] openGL.errors: Add missing errors. --- 3-mid/opengl/private/gl/source/gl.ads | 14 +++++++++----- 3-mid/opengl/source/opengl-errors.adb | 17 +++++++++++------ 2 files changed, 20 insertions(+), 11 deletions(-) diff --git a/3-mid/opengl/private/gl/source/gl.ads b/3-mid/opengl/private/gl/source/gl.ads index 6157801..3de968e 100644 --- a/3-mid/opengl/private/gl/source/gl.ads +++ b/3-mid/opengl/private/gl/source/gl.ads @@ -131,11 +131,15 @@ is GL_POLYGON_OFFSET_FILL : constant := 16#8037#; -- ErrorCode - GL_NO_ERROR : constant := 0; - GL_INVALID_ENUM : constant := 16#500#; - GL_INVALID_VALUE : constant := 16#501#; - GL_INVALID_OPERATION : constant := 16#502#; - GL_OUT_OF_MEMORY : constant := 16#505#; + GL_NO_ERROR : constant := 0; + GL_INVALID_ENUM : constant := 16#500#; + GL_INVALID_VALUE : constant := 16#501#; + GL_INVALID_OPERATION : constant := 16#502#; + GL_STACK_OVERFLOW : constant := 16#503#; + GL_STACK_UNDERFLOW : constant := 16#504#; + GL_OUT_OF_MEMORY : constant := 16#505#; + GL_INVALID_FRAMEBUFFER_OPERATION : constant := 16#506#; + GL_CONTEXT_LOST : constant := 16#507#; -- FrontFaceDirection GL_CW : constant := 16#900#; diff --git a/3-mid/opengl/source/opengl-errors.adb b/3-mid/opengl/source/opengl-errors.adb index ce06870..ea54fc9 100644 --- a/3-mid/opengl/source/opengl-errors.adb +++ b/3-mid/opengl/source/opengl-errors.adb @@ -21,12 +21,16 @@ is begin case the_Error is - when GL.GL_NO_ERROR => return "no error"; - when GL_INVALID_ENUM => return "invalid Enum"; - when GL_INVALID_VALUE => return "invalid Value"; - when GL_INVALID_OPERATION => return "invalid Operation"; - when GL_OUT_OF_MEMORY => return "out of Memory"; - when others => return "unknown openGL error detected (Code:" & the_Error'Image & ")"; + when GL.GL_NO_ERROR => return "no error"; + when GL_INVALID_ENUM => return "invalid Enum"; + when GL_INVALID_VALUE => return "invalid Value"; + when GL_INVALID_OPERATION => return "invalid Operation"; + when GL_STACK_OVERFLOW => return "Stack overflow"; + when GL_STACK_UNDERFLOW => return "Stack underflow"; + when GL_OUT_OF_MEMORY => return "out of Memory"; + when GL_INVALID_FRAMEBUFFER_OPERATION => return "invalid framebuffer Operation"; + when GL_CONTEXT_LOST => return "Context lost"; + when others => return "unknown openGL error detected (Code:" & the_Error'Image & ")"; end case; end; end if; @@ -36,6 +40,7 @@ is + procedure log (Prefix : in String := "") is begin