www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.learn - Tid between classes

reply "Stephen Jones" <siwenjo gmail.com> writes:
As far as I can see gtkD no longer supports openGL so I was 
thinking it might be possible to run a gtkD GUI on the main 
thread and openGL/Derelict on another. The Gl thread is derived; 
extends Thread. With threads having separate memory is this 
assumption correct?

If it is, I would like to use message passing via Tid(s) to allow 
the gui to tell the gl thread what to draw and where. I can pass 
the main threads Tid to gl upon construction, but I don't 
particularly want to set up a while loop on the main thread 
looking to receive the Tid sent back from the owned gl thread. 
But I need the gl Tid to send data through to the gl thread. Is 
there a another way to access the gl thread's Tid from within the 
main thread?
Mar 07 2013
next sibling parent Jacob Carlborg <doob me.com> writes:
On 2013-03-07 11:07, Stephen Jones wrote:
 As far as I can see gtkD no longer supports openGL so I was thinking it
 might be possible to run a gtkD GUI on the main thread and
 openGL/Derelict on another. The Gl thread is derived; extends Thread.
 With threads having separate memory is this assumption correct?

 If it is, I would like to use message passing via Tid(s) to allow the
 gui to tell the gl thread what to draw and where. I can pass the main
 threads Tid to gl upon construction, but I don't particularly want to
 set up a while loop on the main thread looking to receive the Tid sent
 back from the owned gl thread. But I need the gl Tid to send data
 through to the gl thread. Is there a another way to access the gl
 thread's Tid from within the main thread?
Not to answer the question but DWT supports OpenGL: https://github.com/d-widget-toolkit/dwt -- /Jacob Carlborg
Mar 07 2013
prev sibling parent Mike Wey <mike-wey example.com> writes:
On 03/07/2013 11:07 AM, Stephen Jones wrote:
 As far as I can see gtkD no longer supports openGL so I was thinking it
 might be possible to run a gtkD GUI on the main thread and
 openGL/Derelict on another. The Gl thread is derived; extends Thread.
 With threads having separate memory is this assumption correct?

 If it is, I would like to use message passing via Tid(s) to allow the
 gui to tell the gl thread what to draw and where. I can pass the main
 threads Tid to gl upon construction, but I don't particularly want to
 set up a while loop on the main thread looking to receive the Tid sent
 back from the owned gl thread. But I need the gl Tid to send data
 through to the gl thread. Is there a another way to access the gl
 thread's Tid from within the main thread?
GtkD still supports openGL using gtkglext. -- Mike Wey
Mar 08 2013