digitalmars.D.learn - Building basic gtkd,opengl application
- =?UTF-8?B?TWljaGHFgg==?= (10/10) Sep 20 2015 I am trying to make some application using gtkd and opengl.
- BBasile (7/17) Sep 20 2015 at least one obvious error: line 37, `MyArea glarea = new
- BBasile (5/26) Sep 20 2015 NVM this is totally wrong. You can create an instance without
- =?UTF-8?B?TWljaGHFgg==?= (1/1) Sep 21 2015 So no idea how to make basic gtk/opengl application working?
- =?UTF-8?Q?Ali_=c3=87ehreli?= (16/17) Sep 21 2015 With no experience at all, copying an example without opengl from a
- =?UTF-8?B?TWljaGHFgg==?= (4/5) Sep 21 2015 Yes and clear output there.
- bachmeier (3/4) Sep 21 2015 The project has its own forum if you haven't already posted
- =?UTF-8?B?TWljaGHFgg==?= (3/7) Sep 21 2015 I didn't. I will try there.
- =?UTF-8?B?TWljaGHFgg==?= (4/4) Sep 21 2015 It turns out it was caused by a bug in the gtkd.
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.
Sep 20 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.
Sep 20 2015
On Monday, 21 September 2015 at 03:26:36 UTC, BBasile wrote:On Sunday, 20 September 2015 at 22:30:54 UTC, Michał wrote: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... :/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.
Sep 20 2015
So no idea how to make basic gtk/opengl application working?
Sep 21 2015
On 09/21/2015 10:59 AM, Michał wrote:So no idea how to make basic gtk/opengl application working?With no experience at all, copying an example without opengl from a basic and incomplete Turkish gtkd tutorial[1]: import gtk.Window; import gtk.Main; int main(string[] args) { Main.init(args); auto pencere = new Window("deneme"); pencere.show(); Main.run; return 0; } Does that work? Ali [1] http://ddili.org/ders/gtkd/merhaba_gtkd.html
Sep 21 2015
On Monday, 21 September 2015 at 18:07:27 UTC, Ali Çehreli wrote:Does that work?Yes and clear output there. I have tried some basic examples of gtkd and they seems to work. GLArea has some problems.
Sep 21 2015
On Monday, 21 September 2015 at 17:59:17 UTC, Michał wrote:So no idea how to make basic gtk/opengl application working?The project has its own forum if you haven't already posted there: http://forum.gtkd.org/
Sep 21 2015
On Monday, 21 September 2015 at 18:08:15 UTC, bachmeier wrote:On Monday, 21 September 2015 at 17:59:17 UTC, Michał wrote:I didn't. I will try there. Thanks for help.So no idea how to make basic gtk/opengl application working?The project has its own forum if you haven't already posted there: http://forum.gtkd.org/
Sep 21 2015
It turns out it was caused by a bug in the gtkd. Thanks to Mike Wey already fixed. My minimal working code if somebody was intrested. <http://pastebin.com/Eu3QJUj0>
Sep 21 2015