Building basic gtkd,opengl application

BBasile via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Sun Sep 20 20:26:34 PDT 2015


On Sunday, 20 September 2015 at 22:30:54 UTC, MichaƂ wrote:
> I am trying to make some application using gtkd and opengl.
> I have made simple program but it didn't work and I have no 
> idea why.
>
> I have never used gtk so maybe I'm doing something stupid : /
>
> The code:
> http://pastebin.com/7NfbMqaK
>
> Error:
> http://pastebin.com/vaFAP0bu
>
> Some ideas?
> Any tips to gtkd/gtk/gl are welcome.

at least one obvious error: line 37, `MyArea glarea = new 
MyArea();`

`Myarea` scope is limited to the __ctor. You should declare it as 
a class private variable and then instantiate it in the _ctor, 
otherwise. With the GC it's probably still alive til next 
collection but this is nevertheless an error.


More information about the Digitalmars-d-learn mailing list