Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Status of openGL support in GtkAda.

112 views
Skip to first unread message

Rod Kay

unread,
Sep 21, 2023, 4:37:02 AM9/21/23
to
Hello.all,

Has anyone had any success using openGL in GtkAda ?

I tried a quick test today and although the 'Gtk.GLArea' and
'Gdk.GLContext' packages are present, I was unable to get a GL context.

Also, the testgtk program has no openGL demo, as it used to have.

I used openGL/GtkAda to good effect many years ago. Has openGL
support then been dropped completely ?

I recall there was a Gtk3 bug related to openGL and thought that
might possibly be the reason why it is absent in GtkAda. Does GtkAda use
Gtk4, yet ?

I'm quite keen to try my hand at game programming (and have
developed an Ada game engine library), so any advice/info would be
greatly appreciated.


Regards.

Vadim Godunko

unread,
Oct 2, 2023, 4:44:18 AM10/2/23
to
Rod,

GtkAda is binding for Gtk+ 3.24.x version, it doesn't support Gtk 4.

GtkAda doesn't provide OpenGL API binding, but supports OpenGL. There is no example in testgtk for this reason - it requires OpenGL API binding.

Rod Kay

unread,
Oct 30, 2023, 5:44:03 AM10/30/23
to
On 2/10/23 19:44, Vadim Godunko wrote:
>>
>
> GtkAda is binding for Gtk+ 3.24.x version, it doesn't support Gtk 4.
>
> GtkAda doesn't provide OpenGL API binding, but supports OpenGL. There is no example in testgtk for this reason - it requires OpenGL API binding.


I'm very happy to report that openGL support in gtkada works fine. I
made a simple blunder in my initial test (not attaching the gl_Area
widget to my main window widget *sigh* :) ).

It is also possible to use an openGL engine (ie a renderer in it's
own ada task) with gtakada. A simple protected object to prevent mutual
access between the gtkada task (main environment task) and the openGL
engine task, is all that was required.

*Thank* you Vadim for letting me know that the openGL support is there.

Now, onto my game ! ... :D

"The game is afoot!"


Regards.


P.S. Would anyone know if gtkada might be 'upgraded' to support gtk4 ?
Just curious (gtk3 is fine for my purposes).

Rod Kay

unread,
Oct 30, 2023, 6:09:48 AM10/30/23
to
On 2/10/23 19:44, Vadim Godunko wrote:
>>
>
> GtkAda is binding for Gtk+ 3.24.x version, it doesn't support Gtk 4.
>
> GtkAda doesn't provide OpenGL API binding, but supports OpenGL. There is no example in testgtk for this reason - it requires OpenGL API binding.


Rod Kay

unread,
Oct 30, 2023, 6:16:14 AM10/30/23
to
On 2/10/23 19:44, Vadim Godunko wrote:
>>
>
> GtkAda is binding for Gtk+ 3.24.x version, it doesn't support Gtk 4.
>
> GtkAda doesn't provide OpenGL API binding, but supports OpenGL. There
is no example in testgtk for this reason - it requires OpenGL API binding.


Rod Kay

unread,
Oct 30, 2023, 6:19:46 AM10/30/23
to
On 2/10/23 19:44, Vadim Godunko wrote:
>>
>
> GtkAda is binding for Gtk+ 3.24.x version, it doesn't support Gtk 4.
>
> GtkAda doesn't provide OpenGL API binding, but supports OpenGL. There
is no example in testgtk for this reason - it requires OpenGL API binding.


I'm very happy to report that openGL support in gtkada works fine. I
made a simple blunder in my initial test (not attaching the gl_Area
widget to my main window widget *sigh* :) ).

It is also possible to use an openGL engine (ie a renderer in it's
own ada task) with gtkada. A simple protected object to prevent mutual

Rod Kay

unread,
Oct 30, 2023, 7:32:06 AM10/30/23
to
Ugh ... sorry about the multiples.

My reply stalled when sending, so I tried re-sending ... several
times :/.
0 new messages