View Full Version : SetPixelFormat crash (multisampling)

04-19-2008, 11: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...?

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

04-19-2008, 12:54 PM
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