PDA

View Full Version : SetPixelFormat crash (multisampling)



remdul
04-19-2008, 10:36 AM
In order to get multisampling working, one first needs to create a window and GL context before being able to detect the extension.

But do I _have_ to destroy the window and create a new one? I tried to re-use the window (while destroying and re-creating everything else with the new pixelformat), but my program crashes on the SetPixelFormat call. I'm wondering in what way is the window 'changed' so that I can't re-use it again...?

Zengar
04-19-2008, 10:44 AM
Please read the documentation of the SetPixelFormat. It states clearly that it may be called only once per window.

remdul
04-19-2008, 11:54 AM
Sorry, you are correct. It is due to "significant complications for the Window Manager and for multithread applications". I must have missed that part of the docs. Link for the lazy (like me): http://msdn2.microsoft.com/en-us/library/ms537559(VS.85).aspx