Add initial prototype.

This commit is contained in:
Rod Kay
2022-07-31 17:34:54 +10:00
commit 54a53b2ac0
1421 changed files with 358874 additions and 0 deletions

View File

@@ -0,0 +1,44 @@
with eGL.Binding,
eGL.Pointers,
System;
package body openGL.Display
is
use eGL,
eGL.Binding,
eGL.Pointers;
function Default return Item
is
use type System.Address, eGL.EGLBoolean;
the_Display : Display.item;
Success : EGLBoolean;
Status : EGLBoolean;
begin
the_Display.Thin := eglGetDisplay (Display_Pointer (EGL_DEFAULT_DISPLAY));
if the_Display.Thin = egl_NO_DISPLAY then
raise openGL.Error with "Failed to open the default Display with eGL.";
end if;
Success := eglInitialize (the_Display.Thin, the_Display.Version_major'Unchecked_Access,
the_Display.Version_minor'Unchecked_Access);
if Success = egl_False then
raise openGL.Error with "Failed to initialise eGL using the default Display.";
end if;
Status := eglBindAPI (EGL_OPENGL_ES_API);
return the_Display;
end Default;
end openGL.Display;