Multisampling and dummy window


I try to create an OpenGL context that support multisampling… Under MacOS it’s pretty easy but I fell like in hell under Windows because of the OpenGL 1.1 implementation…

Is it required to create a dummy window or can I just create a dummy context? If I create a dummy window it can set the pixel format but when I create a dummy context, SetPixelFormat returns false…


Yes, you need to create a dummy window, setup a non-AA context, get function pointers, close window. With your main window, now you can use the wgl function pointers to setup AA pixel format.

So the only reason to create a dummy window is to get function pointers.

So why a dummy context isn’t enough? Create the context, get the pointers, close the context and create the context for multisampling?

Yes, precisely

You need to set the pixel format for the main window, then make a context. But you have already set a non-AA pixel format.
You can only setup pixel format once per window.

That is why you need a dummy window.

This topic was automatically closed 183 days after the last reply. New replies are no longer allowed.