-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Update version numbers - Warning about broken function in Vulkan API - New Vulkan test Finishes #24
- Loading branch information
Showing
10 changed files
with
222 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
GNATdoc.Index = { | ||
"project": "ASFML", | ||
"timestamp": "2024-02-10 23:00:22" | ||
"timestamp": "2024-02-11 18:20:10" | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
.PHONY: all clean run | ||
|
||
all: | ||
gprbuild | ||
|
||
clean: | ||
gprclean | ||
|
||
run: | ||
./main |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
with Ada.Strings.Unbounded.Text_IO; | ||
with Ada.Text_IO; use Ada.Text_IO; | ||
|
||
with Sf.Window.WindowBase; use Sf, Sf.Window, Sf.Window.WindowBase; | ||
with Sf.Window.VideoMode; use Sf.Window.VideoMode; | ||
with Sf.Window.Event; use Sf.Window.Event; | ||
with Sf.Window.Keyboard; use Sf.Window.Keyboard; | ||
with Sf.Window.Vulkan; | ||
|
||
|
||
procedure Main is | ||
|
||
Window : sfWindowBase_Ptr; | ||
Mode : sfVideoMode := (800, 600, 32); | ||
Event : aliased sfEvent; | ||
begin | ||
|
||
Window := Create (Mode, "Vulkan"); | ||
if Window = null then | ||
Put_Line ("Failed to create window"); | ||
return; | ||
end if; | ||
|
||
SetVisible (Window, sfTrue); | ||
|
||
|
||
if Sf.Window.Vulkan.isAvailable (requireGraphics => sf.sfTrue) then | ||
Ada.Text_IO.Put_Line ("Vulkan with Graphics supported"); | ||
else | ||
if Sf.Window.Vulkan.isAvailable (requireGraphics => sf.sfFalse) then | ||
Ada.Text_IO.Put_Line ("Vulkan without Graphics supported"); | ||
else | ||
Ada.Text_IO.Put_Line ("Vulkan not supported"); | ||
end if; | ||
-- API with problems, see https://github.com/SFML/CSFML/issues/227 | ||
-- for Extension of Sf.Window.Vulkan.getGraphicsRequiredInstanceExtensions loop | ||
-- Ada.Strings.Unbounded.Text_IO.Put_Line (Extension); | ||
-- end loop; | ||
end if; | ||
|
||
while IsOpen (Window) = sfTrue loop | ||
while PollEvent (Window, Event'ACCESS) = sfTrue loop | ||
if Event.eventType = sfEvtClosed then | ||
Close (Window); | ||
Put_Line ("Attempting to close"); | ||
elsif Event.eventType = sfEvtKeyPressed and then isKeyPressed (sfKeyEscape) = sfTrue then | ||
Close (Window); | ||
Put_Line ("Attempting to close"); | ||
end if; | ||
end loop; | ||
|
||
|
||
|
||
end loop; | ||
Destroy (Window); | ||
|
||
end Main; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
with "../../asfml_opengl.gpr"; | ||
|
||
project Main is | ||
|
||
for Create_Missing_Dirs use "True"; | ||
|
||
for Source_Dirs use ("."); | ||
for Object_Dir use "obj"; | ||
for Main use ("main.adb"); | ||
for Exec_Dir use "."; | ||
|
||
end Main; |