Skip to content

wglgears: revert bad fix

Erik Faye-Lund requested to merge kusma/mesa-demos:wglgears-fixes into master

In 27813895, I removed the re-creation of the context, thinking that we could simply call SetPixelFormat again on the old window instead.

This fix wasn't a great idea; even if it seems to work fine on modern Windows versions, the documentation says that SetPixelFormat can only be set once per window. And worse, Mesa's OpenGL32.DLL emulation code seems to depend on this, ignoring any consecutive calls. This means that with Mesa, we get no multisampling here.

So, let's revert this, and instead follow what the docs say.

This follows up with targeted fixes for the two issues that this was meant to fix instead.

Merge request reports