Skip to content

Commit

Permalink
Include also default initializations to sfRenderStates
Browse files Browse the repository at this point in the history
This will let the user choose between an initialization expression or the
call to the create function.

See issue:  sfRenderStates "constructors" from shaders and textures #20
  • Loading branch information
mgrojo committed Jul 9, 2023
1 parent 7045ed3 commit c428084
Show file tree
Hide file tree
Showing 3 changed files with 87 additions and 5 deletions.
82 changes: 82 additions & 0 deletions doc/docs/sf__graphics__renderstates___spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -207,6 +207,27 @@ GNATdoc.Documentation = {
"text": "Sf.Graphics.BlendMode.sfBlendMode",
"href": "docs/sf__graphics__blendmode___spec.html#L71C9"
},
{
"kind": "span",
"cssClass": "text",
"text": " "
},
{
"kind": "span",
"cssClass": "identifier",
"text": ":="
},
{
"kind": "span",
"cssClass": "text",
"text": " "
},
{
"kind": "span",
"cssClass": "identifier",
"text": "Sf.Graphics.BlendMode.sfBlendAlpha",
"href": "docs/sf__graphics__blendmode___spec.html#L82C4"
},
{
"kind": "span",
"cssClass": "identifier",
Expand Down Expand Up @@ -260,6 +281,27 @@ GNATdoc.Documentation = {
"text": "Sf.Graphics.Transform.sfTransform",
"href": "docs/sf__graphics__transform___spec.html#L28C9"
},
{
"kind": "span",
"cssClass": "text",
"text": " "
},
{
"kind": "span",
"cssClass": "identifier",
"text": ":="
},
{
"kind": "span",
"cssClass": "text",
"text": " "
},
{
"kind": "span",
"cssClass": "identifier",
"text": "Sf.Graphics.Transform.Identity",
"href": "docs/sf__graphics__transform___spec.html#L37C4"
},
{
"kind": "span",
"cssClass": "identifier",
Expand Down Expand Up @@ -303,6 +345,26 @@ GNATdoc.Documentation = {
"text": "sfTexture_Ptr",
"href": "docs/sf__graphics___spec.html#L62C9"
},
{
"kind": "span",
"cssClass": "text",
"text": " "
},
{
"kind": "span",
"cssClass": "identifier",
"text": ":="
},
{
"kind": "span",
"cssClass": "text",
"text": " "
},
{
"kind": "span",
"cssClass": "keyword",
"text": "null"
},
{
"kind": "span",
"cssClass": "identifier",
Expand Down Expand Up @@ -346,6 +408,26 @@ GNATdoc.Documentation = {
"text": "sfShader_Ptr",
"href": "docs/sf__graphics___spec.html#L41C9"
},
{
"kind": "span",
"cssClass": "text",
"text": " "
},
{
"kind": "span",
"cssClass": "identifier",
"text": ":="
},
{
"kind": "span",
"cssClass": "text",
"text": " "
},
{
"kind": "span",
"cssClass": "keyword",
"text": "null"
},
{
"kind": "span",
"cssClass": "identifier",
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": "2023-07-09 19:44:26"
"timestamp": "2023-07-09 20:02:56"
};
8 changes: 4 additions & 4 deletions include/sf-graphics-renderstates.ads
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,10 @@ package Sf.Graphics.RenderStates is
--/< Texture
--/< Shader
type sfRenderStates is record
blendMode : aliased Sf.Graphics.BlendMode.sfBlendMode;
transform : aliased Sf.Graphics.Transform.sfTransform;
texture : sfTexture_Ptr;
shader : sfShader_Ptr;
blendMode : aliased Sf.Graphics.BlendMode.sfBlendMode := Sf.Graphics.BlendMode.sfBlendAlpha;
transform : aliased Sf.Graphics.Transform.sfTransform := Sf.Graphics.Transform.Identity;
texture : sfTexture_Ptr := null;
shader : sfShader_Ptr := null;
end record;
type sfRenderStates_Ptr is access all sfRenderStates;

Expand Down

0 comments on commit c428084

Please sign in to comment.