Getting GtkD working with OpenGL

Chalix via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Thu Oct 6 08:18:37 PDT 2016


On Thursday, 6 October 2016 at 13:35:01 UTC, Mike Parker wrote:
> So, change DerelictGL3.load to DerelictGL.load, then add a call 
> to DerelictGL.reload after creating and activating the context.

Thank you! That fixed the segmentation fault problem and the 
crash :)

But I still struggle with the right Context...

if I do something like this

	DerelictGL.load();
	area.makeCurrent();
	DerelictGL.reload();

I get an (runtime) error (on the terminal where I run my 
application):

(LibraryTest:2984): Gtk-CRITICAL **: gtk_gl_area_make_current: 
assertion 'gtk_widget_get_realized (widget)' failed
derelict.util.exception.DerelictException at gl3.d(85): 
DerelictGL3.reload failure: An OpenGL context is not currently 
active.
[...]


After all, I really don't know, what a GLContext is, what I need 
it for and how to use it. If somebody can explain it to me, I 
would be happy! I didn't find anything about it on the Internet, 
but I like to know, whats going on behind my code...

I will keep on playing around with all the context functions, 
maybe I find something by accident that works xD




More information about the Digitalmars-d-learn mailing list