I have written an OpenGL/Win32 screensaver in C++. It works well, but now i want to enable multisampling (using the extensions). That works fine in other applications using the two pass system (create the window, query multisampling, destroy window, create new window with multisampling). But with the screensaver “template”, you don’t create the window yourself, so i don’t know how to recreate it (with multisampling enabled) after it is destroyed.
Huh? Then don’t use the window you got from the screensaver template for the selection, but create your own temporary dummy window, find the matching pixelformat there, throw the dummy window away, and set the pixelformat in the real thing.
Or use a standard double buffered pixelformat plus the three framebuffer object related extensions to allocate an offscreen surface, render everything to a multisampled FBO and downsample it with the framebuffer_blit extension to the window’s backbuffer and display it with a swap.
Of course that won’t work on implementations without these extensions.