Carbon windows and AGL

Uli Kusterer kusterer at gmail.com
Fri Apr 27 12:07:59 PDT 2007


Am 27.04.2007 um 00:07 schrieb Philippe C.D. Robert:
> I am developing a crossplatform rendering framework (in plain C)  
> which is supposed to open multiple OpenGL windows, each one in its  
> own posix thread. On OS X I create the windows using the  
> CreateNewWindow function and a window event handler:
>
> CreateNewWindow(kDocumentWindowClass,  
> (kWindowStandardHandlerAttribute| 
> kWindowStandardDocumentAttributes), &winBounds, &w->winRef);
>
> My problem now is, the so created windows have no decoration at all  
> and lie in the background. What am I doing wrong?

  *never* create or manipulate GUI from any thread other than the  
main thread. Unless it's explicitly documented as being thread-safe,  
you can't assume an API to be safe for use from several threads, nor  
from another thread than the main thread.

Cheers,
-- M. Uli Kusterer
http://www.zathras.de





More information about the MacOSX-dev mailing list