opengl.renderer.clear_frame: Add extra checks for GL errors.

This commit is contained in:
Rod Kay
2025-03-20 22:51:48 +11:00
parent b92a5ed84c
commit 87d9031e1d

View File

@@ -2,6 +2,7 @@ with
GL, GL,
GL.Binding, GL.Binding,
openGL.Tasks, openGL.Tasks,
openGL.Errors,
interfaces.C; interfaces.C;
package body openGL.Renderer package body openGL.Renderer
@@ -33,16 +34,23 @@ is
use GL.Binding; use GL.Binding;
check_is_OK : constant Boolean := openGL.Tasks.Check with Unreferenced; check_is_OK : constant Boolean := openGL.Tasks.Check with Unreferenced;
begin begin
Errors.log;
glClearColor (GLfloat (to_Primary (Self.Background.Primary.Red)), glClearColor (GLfloat (to_Primary (Self.Background.Primary.Red)),
GLfloat (to_Primary (Self.Background.Primary.Green)), GLfloat (to_Primary (Self.Background.Primary.Green)),
GLfloat (to_Primary (Self.Background.Primary.Blue)), GLfloat (to_Primary (Self.Background.Primary.Blue)),
GLfloat (to_Primary (Self.Background.Alpha))); GLfloat (to_Primary (Self.Background.Alpha)));
Errors.log;
glClear ( GL_COLOR_BUFFER_BIT glClear ( GL_COLOR_BUFFER_BIT
or GL_DEPTH_BUFFER_BIT); or GL_DEPTH_BUFFER_BIT);
Errors.log;
glCullFace (GL_BACK); glCullFace (GL_BACK);
Errors.log;
glEnable (GL_CULL_FACE); glEnable (GL_CULL_FACE);
Errors.log;
end clear_Frame; end clear_Frame;