Skip to content

Commit

Permalink
Final v2.6.0 Release Candidate 1
Browse files Browse the repository at this point in the history
- Update version numbers
- Warning about broken function in Vulkan API
- New Vulkan test

Finishes #24
  • Loading branch information
mgrojo committed Feb 11, 2024
1 parent d73cc1b commit 675bd41
Show file tree
Hide file tree
Showing 10 changed files with 222 additions and 18 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ It is written in standard Ada without the use of any specific GNAT extensions, b

## State

The binding is considered complete. Three versions of [CSFML](https://github.com/SFML/CSFML)
have been bound: 1.6, 2.4 and 2.5 (see [Releases](https://github.com/mgrojo/ASFML/releases/)). The API is considered stable, changes would only be made to fix errors or to upgrade to a new SFML version.
The binding is considered complete. Several versions of [CSFML](https://github.com/SFML/CSFML)
have been bound: 1.6, 2.4, 2.5 and 2.6 (see [Releases](https://github.com/mgrojo/ASFML/releases/)). The API is considered stable, changes would only be made to fix errors or to upgrade to a new SFML version.

The library has been tested with several GNAT versions and on Windows 10 and Ubuntu Linux 20.04 LTS and 22.04.

Expand Down
4 changes: 2 additions & 2 deletions alire.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name = "asfml"
description = "An Ada binding to SFML, the Simple and Fast Multimedia Library"
version = "2.5.5"
version = "2.6.0-c1"
long-description = """
[![ASFML logo](https://raw.githubusercontent.com/mgrojo/ASFML/master/images/ASFML_Logo.svg)](https://www.sfml-dev.org)
![Ada (GNAT)](https://github.com/mgrojo/ASFML/workflows/Ada%20(GNAT)/badge.svg)
Expand Down Expand Up @@ -31,4 +31,4 @@ website = "https://mgrojo.github.io/ASFML/"
tags = ["audio", "games", "opengl", "cross-platform", "multimedia", "binding", "graphics", "sfml"]

[[depends-on]]
libcsfml = "^2.5.2"
libcsfml = "^2.6.0"
16 changes: 13 additions & 3 deletions doc/docs/sf__window__vulkan___spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -629,7 +629,7 @@ GNATdoc.Documentation = {
{
"label": "getGraphicsRequiredInstanceExtensions",
"qualifier": "",
"line": 71,
"line": 73,
"column": 13,
"src": "srcs/sf-window-vulkan.ads.html",
"summary": [
Expand All @@ -640,7 +640,7 @@ GNATdoc.Documentation = {
"children": [
{
"kind": "line",
"number": 71,
"number": 73,
"children": [
{
"kind": "span",
Expand All @@ -661,7 +661,7 @@ GNATdoc.Documentation = {
"kind": "span",
"cssClass": "identifier",
"text": "getGraphicsRequiredInstanceExtensions",
"href": "docs/sf__window__vulkan___spec.html#L71C13"
"href": "docs/sf__window__vulkan___spec.html#L73C13"
},
{
"kind": "span",
Expand Down Expand Up @@ -717,6 +717,16 @@ GNATdoc.Documentation = {
{
"kind": "span",
"text": "Vulkan instance extensions required for graphics\n"
},
{
"kind": "html",
"html": "<br/><br/><span class=\"warning\">Warning!</span> ",
"children": [
]
},
{
"kind": "span",
"text": " This function is broken. See https://github.com/SFML/CSFML/issues/227\n"
}
]
}
Expand Down
4 changes: 2 additions & 2 deletions doc/entities/subprograms.js
Original file line number Diff line number Diff line change
Expand Up @@ -1837,10 +1837,10 @@ GNATdoc.EntitiesCategory = {
},
{
"label": "getGraphicsRequiredInstanceExtensions",
"docHref": "docs/sf__window__vulkan___spec.html#L71C13",
"docHref": "docs/sf__window__vulkan___spec.html#L73C13",
"declared": "Sf.Window.Vulkan",
"declared_qualifier": "",
"srcHref": "srcs/sf-window-vulkan.ads.html#L71"
"srcHref": "srcs/sf-window-vulkan.ads.html#L73"
},
{
"label": "getIdentification",
Expand Down
2 changes: 1 addition & 1 deletion doc/index.js
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"
};
126 changes: 118 additions & 8 deletions doc/srcs/sf-window-vulkan.ads.js
Original file line number Diff line number Diff line change
Expand Up @@ -1398,13 +1398,45 @@ GNATdoc.SourceFile = {
{
"kind": "span",
"cssClass": "comment",
"text": "--//////////////////////////////////////////////////////////"
"text": "--/ @warning This function is broken. See https://github.com/SFML/CSFML/issues/227"
}
]
},
{
"kind": "line",
"number": 71,
"children": [
{
"kind": "span",
"cssClass": "text",
"text": " "
},
{
"kind": "span",
"cssClass": "comment",
"text": "--/"
}
]
},
{
"kind": "line",
"number": 72,
"children": [
{
"kind": "span",
"cssClass": "text",
"text": " "
},
{
"kind": "span",
"cssClass": "comment",
"text": "--//////////////////////////////////////////////////////////"
}
]
},
{
"kind": "line",
"number": 73,
"children": [
{
"kind": "span",
Expand All @@ -1425,7 +1457,7 @@ GNATdoc.SourceFile = {
"kind": "span",
"cssClass": "identifier",
"text": "getGraphicsRequiredInstanceExtensions",
"href": "docs/sf__window__vulkan___spec.html#L71C13"
"href": "docs/sf__window__vulkan___spec.html#L73C13"
},
{
"kind": "span",
Expand Down Expand Up @@ -1457,13 +1489,91 @@ GNATdoc.SourceFile = {
},
{
"kind": "line",
"number": 72,
"number": 74,
"children": [
{
"kind": "span",
"cssClass": "text",
"text": " "
},
{
"kind": "span",
"cssClass": "keyword",
"text": "pragma"
},
{
"kind": "span",
"cssClass": "text",
"text": " "
},
{
"kind": "span",
"cssClass": "identifier",
"text": "Compile_Time_Warning"
}
]
},
{
"kind": "line",
"number": 73,
"number": 75,
"children": [
{
"kind": "span",
"cssClass": "text",
"text": " "
},
{
"kind": "span",
"cssClass": "identifier",
"text": "("
},
{
"kind": "span",
"cssClass": "identifier",
"text": "True"
},
{
"kind": "span",
"cssClass": "identifier",
"text": ","
}
]
},
{
"kind": "line",
"number": 76,
"children": [
{
"kind": "span",
"cssClass": "text",
"text": " "
},
{
"kind": "span",
"cssClass": "string",
"text": "\"getGraphicsRequiredInstanceExtensions is broken; see https://github.com/SFML/CSFML/issues/227\""
},
{
"kind": "span",
"cssClass": "identifier",
"text": ")"
},
{
"kind": "span",
"cssClass": "identifier",
"text": ";"
}
]
},
{
"kind": "line",
"number": 77,
"children": [
]
},
{
"kind": "line",
"number": 78,
"children": [
{
"kind": "span",
Expand All @@ -1474,13 +1584,13 @@ GNATdoc.SourceFile = {
},
{
"kind": "line",
"number": 74,
"number": 79,
"children": [
]
},
{
"kind": "line",
"number": 75,
"number": 80,
"children": [
{
"kind": "span",
Expand Down Expand Up @@ -1547,7 +1657,7 @@ GNATdoc.SourceFile = {
},
{
"kind": "line",
"number": 76,
"number": 81,
"children": [
{
"kind": "span",
Expand All @@ -1558,7 +1668,7 @@ GNATdoc.SourceFile = {
},
{
"kind": "line",
"number": 80,
"number": 85,
"children": [
{
"kind": "span",
Expand Down
5 changes: 5 additions & 0 deletions include/sf-window-vulkan.ads
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,13 @@ package Sf.Window.Vulkan is
--/
--/ @return Vulkan instance extensions required for graphics
--/
--/ @warning This function is broken. See https://github.com/SFML/CSFML/issues/227
--/
--//////////////////////////////////////////////////////////
function getGraphicsRequiredInstanceExtensions return sfArrayOfStrings;
pragma Compile_Time_Warning
(True,
"getGraphicsRequiredInstanceExtensions is broken; see https://github.com/SFML/CSFML/issues/227");

private

Expand Down
10 changes: 10 additions & 0 deletions tests/vulkan/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
.PHONY: all clean run

all:
gprbuild

clean:
gprclean

run:
./main
57 changes: 57 additions & 0 deletions tests/vulkan/main.adb
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;
12 changes: 12 additions & 0 deletions tests/vulkan/main.gpr
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;

0 comments on commit 675bd41

Please sign in to comment.