On Monday, 21 September 2015 at 03:26:36 UTC, BBasile wrote:
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.
NVM this is totally wrong. You can create an instance without
keeping trace of it in a variable. This even something common in
laguages using ownership and if you don't need to manipulate the
class instance after its construction... :/