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 ]


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?

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

In this particular case of the fullscreen crashes, I don't think the problem was due to multiple threads trying to perform drawing operations at the same time, but rather the thread that was doing the drawing not being the same one that created the context in the first place.

That shouldn't matter really.


--
Milan Mimica
http://sparklet.sf.net




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