On Sunday, 18 September 2016 at 21:41:45 UTC, Mike Wey wrote:
The demo still uses the old GtkGLExt binding, which usually isn't available in de distributions repositories.

The newer GLArea is easier to use since it's part of GTK.

As for the linker errors, you'll need to link with the OpenGL libraries:
"-L-lGL -L-lGLU"

Hey, thanks for your fast answer! I had a lot of other work to do, so I could only continue working on this project now.

Yeah, that solved my problem :) Now it links. Although if I execute the program, it complains about the missing GtkGLExt library, like expected...
Library load failed: libgdkglext-3.0.so.0

So I wanted to install this library from here:
https://projects.gnome.org/gtkglext/download.html
but the ./configure script tells me,
No package 'pangox' found (pangox >= 1.0.0)

I looked at the folder /usr/lib/x86_64-linux-gnu/ and there is a file called "libpangox-1.0.so.0.0.0". So I don't know, why this is not working...

Anyway, I want to follow Mikes advice and use GLArea instead, so if there is not a quick fix available, lets skip the problems with the GtkGLExt library...



But, sadly enough, I did not get GLArea working, too. The documentation
https://developer.gnome.org/gtk3/stable/GtkGLArea.html
says, I have to connect my render function to the widget like this:
g_signal_connect (gl_area, "render", G_CALLBACK (render), NULL);
But, my compiler can't find the g_signal_connect method (and the GL Methods...):
main.d(22): Error: undefined identifier 'g_signal_connect'
main.d(39): Error: undefined identifier 'glClearColor'
main.d(40): Error: undefined identifier 'glClear'

There might some include files (or import files, as you say in D) missing, but I could not figure out, where to find them for D...

Could you tell me, where this g_signal_connect method can be found? And what I have to include for the GL functionality? Simply "import gtk.GLArea;" does not do the trick...

Btw, is g_signal_connect a GTK method? I intend to use my program platform independent, so if this is dependent on gnome, it would not be good.

Or is there any other way to get the GLArea working? I am used to the Qt Libraries, where you create a QGLWidget and simply override the init and render functions.


Thanks for reading this far, would be great if we could solve this problem :D

Reply via email to