From 0889c6c07c329086b3fbfa7c06744c49840dfb28 Mon Sep 17 00:00:00 2001 From: Rod Kay Date: Wed, 24 Apr 2024 20:05:09 +1000 Subject: [PATCH] opengl.shader: Only show debug info when in debug build mode. --- .../source/lean/shader/opengl-shader.adb | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-) diff --git a/3-mid/opengl/source/lean/shader/opengl-shader.adb b/3-mid/opengl/source/lean/shader/opengl-shader.adb index 5dd78a4..c0a5f26 100644 --- a/3-mid/opengl/source/lean/shader/opengl-shader.adb +++ b/3-mid/opengl/source/lean/shader/opengl-shader.adb @@ -17,6 +17,7 @@ with package body openGL.Shader is use GL.lean, + openGL.Errors, Interfaces; ----------- @@ -85,14 +86,6 @@ is begin Tasks.check; - - -- new_Line (20); - -- for i in the_Source'Range - -- loop - -- put (Character (the_Source (i))); - -- end loop; - - Self.Kind := Kind; if Kind = Vertex @@ -118,7 +111,8 @@ is glGetShaderiv (self.gl_Shader, GL_COMPILE_STATUS, Status'unchecked_Access); - if Status = 0 + if Status = 0 + and Debugging then declare use ada.Text_IO; @@ -156,8 +150,8 @@ is the_Source : aliased constant C.char_array := to_C_char_array (shader_Snippets); begin - -- if Debug - -- then + if Debugging + then new_Line; put_Line ("Shader snippets:"); @@ -177,7 +171,7 @@ is new_Line; new_Line; new_Line; - -- end if; + end if; create_Shader (Self, Kind, the_Source); end define;