http://bugs.winehq.org/show_bug.cgi?id=12923
--- Comment #18 from Roderick Colenbrander thunderbird2k@gmx.net 2008-05-17 14:54:03 --- Likely a lot of unneeded context recreation is done now. Further I'm not restoring the contents of the backbuffer.
In short SetDepthStencilSurface is something which we can't easily do in opengl. In OpenGL you select a pixel format for your drawable (a window, a pixmap or a pbuffer) and this pixel format describes the RGB colors but it also fixes the depth and stencil buffer. In d3d RGB colors aren't tied to depth stencil, you can just attach a depth buffer after you create your 'drawable'. What we must do in case of opengl is to recreate the window and opengl context. This is very tricky stuff and I'm now doing it quickly using a reset command. (but I'm not restoring the backbuffer yet)
Let me create a version which at least won't do a reset when it isn't needed.