opengl.tasks: Only check tasks are the same during debug build mode.

This commit is contained in:
Rod Kay
2024-04-24 19:48:30 +10:00
parent 55099f4991
commit 55cac1b347

View File

@@ -1,8 +1,18 @@
with
openGL.Errors;
package body openGL.Tasks
is
use openGL.Errors;
procedure check
is
begin
if Debugging
then
declare
use Ada,
ada.Task_Identification;
@@ -18,6 +28,8 @@ is
raise Error with "Calling task '" & Task_Identification.Image (current_Task) & "'"
& " /= Renderer task '" & Task_Identification.Image (Renderer_Task) & "'";
end if;
end;
end if;
end check;
@@ -25,7 +37,11 @@ is
function check return Boolean
is
begin
if Debugging
then
check;
end if;
return True;
end check;