opengl.errors: Add a 'Debugging' function with separate bodies for debugging and not debugging.

This commit is contained in:
Rod Kay
2024-04-24 19:13:34 +10:00
parent e202ce548d
commit 5860ed71fb
5 changed files with 37 additions and 1 deletions

View File

@@ -30,7 +30,19 @@ is
"../source/platform/" & external ("opengl_platform", "egl") & "/private",
"../source/platform/" & external ("opengl_platform", "egl") & "/private/thin");
package Naming
is
case Lace_shared.lace_Build_Mode
is
when "debug" =>
for Body ("openGL.Errors.Debugging") use "opengl-errors-debugging.adb";
when others =>
for Body ("openGL.Errors.Debugging") use "opengl-errors-not_debugging.adb";
end case;
end Naming;
package Builder renames Lace_shared.Builder;

View File

@@ -0,0 +1,7 @@
separate (openGL.Errors)
function Debugging return Boolean
is
begin
return True;
end Debugging;

View File

@@ -0,0 +1,7 @@
separate (openGL.Errors)
function Debugging return Boolean
is
begin
return False;
end Debugging;

View File

@@ -70,4 +70,9 @@ is
end log;
function Debugging return Boolean is separate;
end openGL.Errors;

View File

@@ -22,4 +22,9 @@ is
-- Clears any existing error.
-- Sets 'Error_occurred' to true, if a GL error was detected.
function Debugging return Boolean;
--
-- True when the build mode is
end openGL.Errors;