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,17 @@
with
"opengl_demo",
"sdlada",
"lace_shared";
project Core_Test
is
for Object_Dir use "build";
for Exec_Dir use ".";
for Main use ("launch_core_test.adb");
package Ide renames Lace_shared.Ide;
package Builder renames Lace_shared.Builder;
package Compiler renames Lace_shared.Compiler;
package Binder renames Lace_shared.Binder;
end Core_Test;

View File

@@ -0,0 +1,57 @@
with
openGL.Tasks,
openGL.Server,
sdl.Video.Windows.Makers,
sdl.Video.gl,
ada.Task_identification,
ada.Text_IO;
procedure launch_core_Test
--
-- Exercise basic subprograms common to all GL profiles.
--
-- TODO: Complete this.
--
is
use ada.Text_IO;
use type sdl.Video.Windows.window_Flags;
Error : exception;
Window : sdl.Video.Windows.Window;
gl_Context : sdl.Video.gl.Contexts;
begin
---------
--- Setup
--
if not SDL.initialise
then
raise Error with "Unable to initialise SDL.";
end if;
sdl.Video.Windows.Makers.create (Win => Window,
Title => "openGL Demo",
X => 100,
Y => 100,
Width => 200,
Height => 200,
Flags => sdl.Video.Windows.openGL
or sdl.Video.Windows.Resizable);
sdl.Video.gl.create (gl_Context, From => Window);
sdl.Video.gl.set_Current (gl_Context, To => Window);
openGL.Tasks.renderer_Task := ada.Task_identification.current_Task;
---------
--- Tests
--
put_Line ("openGL Server: " & openGL.Server.Version);
delay 2.0;
end launch_core_Test;