The patch for dynamic loading of opengl, http://www.winehq.com/hypermail/wine-cvs/2002/11/0151.html
has caused a (apparently minor) regression in the program earthquake http://www.navagent.com/products/earthquake/
That is a small app (250K download) with a spinning globe that shows current earthquakes; actually a pretty cool little app. The regression is that now when the oceans are turned on (via the settings dialog), the land gets flooded.
Duane Clark wrote:
The patch for dynamic loading of opengl, http://www.winehq.com/hypermail/wine-cvs/2002/11/0151.html
has caused a (apparently minor) regression in the program earthquake http://www.navagent.com/products/earthquake/
And as a bit more information, this is the chunk that does it.
--- wine/dlls/x11drv/x11drv_main.c:1.64 Mon Nov 25 19:04:54 2002 +++ wine/dlls/x11drv/x11drv_main.c Mon Nov 25 19:04:54 2002 @@ -313,8 +317,11 @@ } else screen_depth = DefaultDepthOfScreen( screen );
+ /* Initialize OpenGL */ + X11DRV_OpenGL_Init(display); + /* If OpenGL is available, change the default visual, etc as necessary */ - if ((desktop_vi = X11DRV_setup_opengl_visual( display ))) + if (desktop_dbl_buf && (desktop_vi = X11DRV_setup_opengl_visual( display ))) { visual = desktop_vi->visual; screen = ScreenOfDisplay(display, desktop_vi->screen);
- /* Initialize OpenGL */
- X11DRV_OpenGL_Init(display);
Well, by removing this, you will disable all OpenGL in X11...
/* If OpenGL is available, change the default visual, etc as
necessary */
- if ((desktop_vi = X11DRV_setup_opengl_visual( display )))
- if (desktop_dbl_buf && (desktop_vi = X11DRV_setup_opengl_visual(
display ))) { visual = desktop_vi->visual; screen = ScreenOfDisplay(display, desktop_vi->screen);
Out of curiosity, do you have the 'DesktopDoubleBuffered' option set in your Wine config file ?
Lionel
Lionel Ulmer wrote:
...
/* If OpenGL is available, change the default visual, etc as
necessary */
- if ((desktop_vi = X11DRV_setup_opengl_visual( display )))
- if (desktop_dbl_buf && (desktop_vi = X11DRV_setup_opengl_visual(
display ))) { visual = desktop_vi->visual; screen = ScreenOfDisplay(display, desktop_vi->screen);
Out of curiosity, do you have the 'DesktopDoubleBuffered' option set in your Wine config file ?
I did notice and try that (after posting), and it also fixes it. So I guess the issue becomes whether it should also work without double buffering, as that is the default in the sample config file.
I did notice and try that (after posting), and it also fixes it. So I guess the issue becomes whether it should also work without double buffering, as that is the default in the sample config file.
Well, before my patch, in one of the X11DRV rewrite, the option got somehow lost and was enabled by default whatever the value of the entry in the config file. So that it was working before was a 'feature' :-)
Now let's try to explain the reason of this option : in Windows, you first create the Window and then only tell it that one wants to do OpenGL drawing in it (single or double buffered). Now, in X11, if you plan to use a window to do OpenGL drawings, you first need to be sure that the visual you choose for it is compatible with OpenGL (ie does it support double buffering ? has it a stencil buffer ? ...). The problem is that when Wine detects that the application wants to do double buffered OpenGL drawings in that window, it's too late as the window was already created with the default visual => hence the option to have the default visual used by all windows be double buffered.
I do not think putting it as default is such a good idea as it may lead to performance problems to all the people not using OpenGL... And the gamerz just have to read the config file (if they know how to read, sometimes we wonder when doing 'support' on #WineHQ 8-) ).
As to why it's called 'DesktopDoubleBuffered' and not something else, it's also historic : at the beginnings, OpenGL only worked properly in Desktop mode :-)
Finally, Alexandre (if you read this :-) ), now that you rewrote most of the internal Windows handling code (ie with the Wine window == X11 window stuff), would it be possible to somehow recreate the X11 window when we detect OpenGL attaching to it and replace the old window in Wine's window hierarchy ?
Lionel
Lionel Ulmer lionel.ulmer@free.fr writes:
Finally, Alexandre (if you read this :-) ), now that you rewrote most of the internal Windows handling code (ie with the Wine window == X11 window stuff), would it be possible to somehow recreate the X11 window when we detect OpenGL attaching to it and replace the old window in Wine's window hierarchy ?
Possible, yes. Easy, definitely not ;-)