Re: Building basic gtkd,opengl application

2015-09-21 Thread Michał via Digitalmars-d-learn

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.



Re: Building basic gtkd,opengl application

2015-09-21 Thread Michał via Digitalmars-d-learn

So no idea how to make basic gtk/opengl application working?


Re: Building basic gtkd,opengl application

2015-09-21 Thread Michał via Digitalmars-d-learn

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.


Re: Building basic gtkd,opengl application

2015-09-21 Thread Ali Çehreli via Digitalmars-d-learn

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



Re: Building basic gtkd,opengl application

2015-09-21 Thread Michał via Digitalmars-d-learn

On Monday, 21 September 2015 at 18:08:15 UTC, bachmeier wrote:

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/


I didn't. I will try there.
Thanks for help.


Re: Building basic gtkd,opengl application

2015-09-21 Thread bachmeier via Digitalmars-d-learn

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/


Building basic gtkd,opengl application

2015-09-20 Thread Michał via Digitalmars-d-learn

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.



Re: Building basic gtkd,opengl application

2015-09-20 Thread BBasile via Digitalmars-d-learn

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.


Re: Building basic gtkd,opengl application

2015-09-20 Thread BBasile via Digitalmars-d-learn

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... :/