Re: Getting GtkD working with OpenGL

2016-10-06 Thread Mike Wey via Digitalmars-d-learn
On 10/06/2016 05:18 PM, Chalix wrote: 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

Re: Getting GtkD working with OpenGL

2016-10-06 Thread Chalix via Digitalmars-d-learn
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

Re: Getting GtkD working with OpenGL

2016-10-06 Thread Mike Parker via Digitalmars-d-learn
On Thursday, 6 October 2016 at 10:49:40 UTC, Chalix wrote: glMatrixMode(GL_MODELVIEW); /*Here the program crashes with There are two things wrong with your use of Derelict. First, though you are correctly importing derelict.opengl3.gl to get the deprecated functions (which the gl3

Re: Getting GtkD working with OpenGL

2016-10-06 Thread Chalix via Digitalmars-d-learn
On Tuesday, 4 October 2016 at 17:00:34 UTC, Mike Wey wrote: Replace "import glgdk.GLContext;" with "import gdk.GLContext;" Hey Mike, you've been a great help so far! Thank you :) I thought now I am ready to draw something, but I struggle with the GLContext and GdkGlContext. Where do I get a

Re: Getting GtkD working with OpenGL

2016-10-04 Thread Mike Wey via Digitalmars-d-learn
On 10/03/2016 11:46 PM, Chalix wrote: On Monday, 3 October 2016 at 18:00:53 UTC, Mike Wey wrote: The signal functions can be found in the gobject.Signals module. But you should use the GLArea.addOnCreateContext / addOnRender / addOnResize functions to attach a D delegate to the signal. You

Re: Getting GtkD working with OpenGL

2016-10-03 Thread Chalix via Digitalmars-d-learn
On Monday, 3 October 2016 at 18:00:53 UTC, Mike Wey wrote: The signal functions can be found in the gobject.Signals module. But you should use the GLArea.addOnCreateContext / addOnRender / addOnResize functions to attach a D delegate to the signal. You will still need to link with the OpenGL

Re: Getting GtkD working with OpenGL

2016-10-03 Thread Mike Wey via Digitalmars-d-learn
On 10/03/2016 01:50 PM, Chalix wrote: 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,

Re: Getting GtkD working with OpenGL

2016-10-03 Thread Chalix via Digitalmars-d-learn
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

Re: Getting GtkD working with OpenGL

2016-09-18 Thread Mike Wey via Digitalmars-d-learn
On 09/18/2016 09:36 PM, Chalix wrote: Hi All! This weekend I explored Dlang and I think it's very promising. So I wanted to create some projects I've created with C++ already - for the sake of comparison. I wanted to create a new class which inherits from DrawingArea (from the Gtk library).

Re: Getting GtkD working with OpenGL

2016-09-18 Thread Chalix via Digitalmars-d-learn
Here the code I actually wanted to compile (SimpleGL.d): /* * This file is part of gtkD. * * dui is free software; you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation; either version 3 of the

Getting GtkD working with OpenGL

2016-09-18 Thread Chalix via Digitalmars-d-learn
Hi All! This weekend I explored Dlang and I think it's very promising. So I wanted to create some projects I've created with C++ already - for the sake of comparison. I wanted to create a new class which inherits from DrawingArea (from the Gtk library). This will be my OpenGL-Widget with