Re: [AD] OS X full screen resize (was Re: Allegro 5 TODOs (from wiki))

[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]


On Sat, 2008-12-13 at 10:36 +0100, Milan Mimica wrote:
> Evert Glebbeek wrote:
> > 
> > /* Note:
> >   * Right now, A5 video displays can only be accessed from the thread which
> >   * created them (at lesat for OpenGL). To lift this restriction, we could
> >   * keep track of the current OpenGL context for each thread and make all
> >   * functions accessing the display check for it.. not sure it's worth the
> >   * additional complexity though.
> >   */
> 
> Uh? Doesn't ex_threads2 draw to the display from 6 different threads and none of 
> them created the display, and it still works?
> 

No, it only draws from the main thread. All the worker threads do is
calculate mandelbrots.

> > Just for information's sake: does Allegro offer a way (in the public  
> > API) to get and set the current context?
> 
> al_set_current_display() will make the context current to the thread calling the 
> function, using pretty much the same routines on all three platforms: 
> glXMakeCurrent/wglMakeCurrent/makeCurrentContext
> 

Maybe the comment above is outdated then, and as long as you do proper
locking and call al_set_current_display(), things ought to work.

-- 
Elias Pschernig <elias@xxxxxxxxxx>





Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/