Skip to content

Commit

Permalink
last fixes for v0.7.0
Browse files Browse the repository at this point in the history
  • Loading branch information
flyx committed Mar 9, 2019
1 parent b2ba5d2 commit 5e6dea5
Show file tree
Hide file tree
Showing 8 changed files with 32 additions and 10 deletions.
11 changes: 10 additions & 1 deletion CHANGELOG
Original file line number Diff line number Diff line change
@@ -1,4 +1,13 @@
Upcoming:
v0.7.0:
* Added missing functionality in:
- GL.Objects.Buffers (glBindBufferBase, glDrawElementsInstanced,
texture buffer target)
- GL.Objects.Programs (transform feedback)
* Fixed memory leaks during C-string handling.
* Deprecated old GL.Attributes.Set_Vertex_Attrib_Pointer in favor for
new subroutines there that provide more control.
* Small fixes in tests so that they work on Windows again.
* Made it work with GNAT Community 2018.
* Changed to SemVer versioning (added revision number)
* Improvements to GL.Object system
* Fixed problems in uniforms setter (#105)
Expand Down
15 changes: 11 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,12 +36,18 @@ bindings to the following OpenGL-related libraries:
OpenGLAda supports MacOSX, Windows and X11-based systems. API documentation can
be found on the [project's homepage][4].

## Windows Installer

There is an installer available for Windows + GNAT Community in the
[repository's *releases* section][21] which includes all optional dependencies
except FTGL (because that binding is deprecated).

## Prerequisites

In order to build OpenGLAda, you need to have:

* A GNAT compiler¹. Compilers known to work well with OpenGLAda are
[GnuAda][12], [AdaCore GNAT GPL 2017][1], and [TDM-GCC][17]. More information
[GnuAda][12], [GNAT Community 2018][1], and [TDM-GCC][17]. More information
is available on the [GCC website][5].
* [GPRBuild][2] (is bundled with AdaCore's GNAT distribution). TDM-GCC users
can get it from [here][16] (**NOTE: The gprbuild bundled in this zip is
Expand All @@ -68,8 +74,8 @@ To install OpenGLAda with all optional libraries, execute
$ gprbuild [options] openglada.gpr
$ gprinstall [options] openglada.gpr

Where *[options]* is the set of scenario variables you want to use. The
available variables are:
Where *[options]* is the set of scenario variables you want to use (generally
in the form of `-X`*name*`=`*value*`). The available variables are:

* `Windowing_System`: Sets the backend windowing system. Used for GLFW and also
for system-dependent parts of the API (GLX, WGL, CGL):
Expand Down Expand Up @@ -197,4 +203,5 @@ logo that is used in the SOIL tests is distributed under the terms of the
[16]: http://getadanow.com/#get_windows
[17]: http://tdm-gcc.tdragon.net/
[19]: https://freetype.org/
[20]: https://github.com/flyx/FreeTypeAda
[20]: https://github.com/flyx/FreeTypeAda
[21]: https://github.com/flyx/OpenGLAda/releases
2 changes: 1 addition & 1 deletion install/OpenGLAda.wix
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
InstallerVersion="100" Languages="1033" Compressed="yes"
SummaryCodepage="1252" />
<Media Id="1" Cabinet="OpenGLAda.cab" EmbedCab="yes" />
<SetProperty Id="INSTALLDIR" Value="C:\GNAT\2018" After="AppSearch"/>
<Property Id="INSTALLDIR" Value="C:\GNAT\2018"/>
<Directory Id="TARGETDIR" Name="SourceDir">
<Directory Id="INSTALLDIR" Name="GNAT" ComponentGuidGenerationSeed="005645a9-cb2e-43da-a920-68b7e8d3ae11">
<Component Id="dummy" Guid="fd86164a-4408-496d-a3fb-633a56f1a955" KeyPath="yes" />
Expand Down
3 changes: 1 addition & 2 deletions src/generator/specs.adb
Original file line number Diff line number Diff line change
Expand Up @@ -675,7 +675,6 @@ package body Specs is
Put_Line (Target, "private with " & To_String (Spec_Data.Name) & ";");
end loop;
Put_Line (Target, "procedure GL.Load_Function_Pointers is");
Put_Line (Target, " pragma Preelaborate;");
Put_Line (Target, " use GL.API;");
Put_Line (Target, " generic");
Put_Line (Target, " type Function_Reference is private;");
Expand Down Expand Up @@ -824,4 +823,4 @@ package body Specs is
end loop;
Close (Target);
end Write_Wrapper_Table;
end Specs;
end Specs;
1 change: 0 additions & 1 deletion src/gl/generated/gl-load_function_pointers.adb
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ private with GL.API.Singles;
private with GL.API.UInts;
private with GL.API;
procedure GL.Load_Function_Pointers is
pragma Preelaborate;
use GL.API;
generic
type Function_Reference is private;
Expand Down
2 changes: 1 addition & 1 deletion src/gl/implementation/gl-api-subprogram_reference.ads
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@

function GL.API.Subprogram_Reference (Function_Name : String)
return System.Address;
pragma Preelaborate (GL.API.Subprogram_Reference);
pragma Preelaborate (GL.API.Subprogram_Reference);
5 changes: 5 additions & 0 deletions src/gl/implementation/gl-load_function_pointers.ads
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
-- part of OpenGLAda, (c) 2017 Felix Krause
-- released under the terms of the MIT license, see the file "COPYING"

procedure GL.Load_Function_Pointers;
pragma Preelaborate (GL.Load_Function_Pointers);
3 changes: 3 additions & 0 deletions tests/gl/gl_test-framebuffers.adb
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,7 @@ begin
Display_Backend.Window_Opened loop
Clear (Buffer_Bits'(others => True));

GL.Objects.Textures.Set_Active_Unit (0);
GL.Toggles.Enable (GL.Toggles.Texture_2D);

-- don't let the color affect the texture rendering
Expand All @@ -125,6 +126,8 @@ begin
Token.Add_Vertex (Vector2'(-1.0, 1.0));
end;

GL.Toggles.Disable (GL.Toggles.Texture_2D);

GL.Flush;

Display_Backend.Swap_Buffers;
Expand Down

0 comments on commit 5e6dea5

Please sign in to comment.