I dont think GTA3 has ever worked yet as it uses palettes and I dont recall us ever finishing it (Raphael is the one to ask).
However, try commenting out the line in directx.c : object->visInfo = glXChooseVisual(object->display, DefaultScreen(object->display), dblBuf);
This has caused problems on some manufacturers device drivers. Its something we need to fix, but there's also numerous other things...
There's no demo for gta3 last time I looked :-(
Jason
However, try commenting out the line in directx.c : object->visInfo = glXChooseVisual(object->display, DefaultScreen(object->display), dblBuf);
Basically, for this to work reliably, you have three choices :
- do a full rewrite of the Wine windowing code to be able to somehow 'recreate' on the fly an X Window with new parameters (in this case, a better visual). This would help me also in the OpenGL code :-)
- create yourself (by adding some hacks in X11DRV) a new window with this visual
- do as I did for the DesktopDoubleBuffered option, but more generic (by adding stencil support to the already existing double buffering option). Then people could add in their DLL overrides 'GTA.EXE => windows are double buffered and stencilled'.
Lionel
However, try commenting out the line in directx.c : object->visInfo = glXChooseVisual(object->display, DefaultScreen(object->display), dblBuf);
This seems to work ok on some (my!) drivers, but I know others have had problem with it.
Basically, for this to work reliably, you have three choices :
- do a full rewrite of the Wine windowing code to be able to somehow
'recreate' on the fly an X Window with new parameters (in this case, a better visual). This would help me also in the OpenGL code :-)
Yep - I take it that its not possible to replace the visual of an existing window? I knowledge of X programming is very low, and I dont understand how visuals and contexts all fit together. I've also started looking at some render to texture support Raphael added, and that uses PBuffers which seem to also magic contexts out of thin air. I have no idea how things are supposed to fit together, but I'll get there.
- do as I did for the DesktopDoubleBuffered option, but more generic (by adding stencil support to the already existing double buffering option). Then people could add in their DLL overrides 'GTA.EXE => windows are double buffered and stencilled'.
I dont like adding configuration options for things which should be transparent to the user. I'll have to look into this again in the future, but in the meantime I might put code to catch the X exception and cope with it. However, the window initialization, fullscreen and management code is the worst bit of the d3d8 code.
Incidentally, one thing that annoys me is full screen. Does the d3d < 7 code (or opengl code) do resolution switching, and do you have a pointer to how it occurs. At the moment 'fullscreen' is an undecorated window on the desktop, keeping the desktop window at the resolution it is already at.
Jason
On Thu, Aug 14, 2003 at 10:02:55PM +0100, Jason Edmeades wrote:
This seems to work ok on some (my!) drivers, but I know others have had problem with it.
Well, your driver must either 1) be less picky on visual consistency or 2) have a stencil associated to the default double-buffered visual...
Yep - I take it that its not possible to replace the visual of an existing window? I knowledge of X programming is very low, and I dont understand how visuals and contexts all fit together.
Not that I know of... And the only rule, from what I know, is that the visual you create your GLX context with must be compatible with the one your window was created with.
So if you create a window with a stencil and then use a stencil-less visual, it will work. The reverse won't work though as it's not compatible.
I've also started looking at some render to texture support Raphael added, and that uses PBuffers which seem to also magic contexts out of thin air. I have no idea how things are supposed to fit together, but I'll get there.
Well, the other way would be to do all rendering to PBuffers and copy this to the main window on each Flip... But this would slow us down even if the drivers optimises PBuffer => frame buffer blits (especially if the driver supports 'page flipping' or I do not remember how NVIDIA tells their optimisations for full-screen glXSwapBuffers).
But well, that would be the easiest solution :-)
I dont like adding configuration options for things which should be transparent to the user. I'll have to look into this again in the future, but in the meantime I might put code to catch the X exception and cope with it.
Well, yeah, at least handle the X error gracefully. Or this is where you could put something like 'Add the following lines to your config file and re-run Wine'. And as you can get easily the application name here, you can pretty easily generate a nice pre-formatted config entry.
Of course it's hacky ... but it beats rewriting / massaging Wine's core windowing code (hullo Alexandre :-) ) into accepting OpenGL quirks.
Incidentally, one thing that annoys me is full screen. Does the d3d < 7 code (or opengl code) do resolution switching, and do you have a pointer to how it occurs. At the moment 'fullscreen' is an undecorated window on the desktop, keeping the desktop window at the resolution it is already at.
Well, I never use games full-screen so I never actually did some code for this :-)
I know that :
1) there is no full-screen option in OpenGL as games use standard Win32 code to go into full-screen.
2) DDraw's full-screen code relies on ChageDesktopSettings or something like that to switch resolution.
Lionel
--- Lionel Ulmer lionel.ulmer@free.fr wrote:
On Thu, Aug 14, 2003 at 10:02:55PM +0100, Jason Edmeades wrote:
I dont like adding configuration options for things which should be transparent to the user. I'll have to look into this again in the future, but in the meantime I might put code to catch the X exception and cope with it.
Well, yeah, at least handle the X error gracefully. Or this is where you could put something like 'Add the following lines to your config file and re-run Wine'. And as you can get easily the application name here, you can pretty easily generate a nice pre-formatted config entry.
On those two notes, I spawned an idea ;) Jason is right, there are things that should be transparent to the user, and a note in the terminal window wont always be shown (in the case of the user not launching wine from the terminal window), why not, when we need an option to be put in the config file, have wine automagically do just that? Instead of a note saying this needs to be added to your config, just have wine do it and then pop up a message saying wine needs to restart, do it now or do it later?
Before you flame me with transparency is key, it is still transparent to the user, because windows just pops up with that all the time: Windows needs to be restarted in order for the changes you have made to take effect. Press OK to restart now or Cancel to restart later.
Of course there are some problems I can think of (if anyone can think of a workaround feel free to post it):
1) The whole message box saying wine needs to be restarted, workaround note in terminal saying it instead.. 2) Doing things behind users back is to M$'ish, workaround, put a note in terminal saying we are doing this (warn()) 3) Config options that cause problems with some programs but fix others, workaround 1 word: appdefaults 4) Config options that dont work (are disabled for whatever reason), workaround fix them and if that isnt feasible due to Xfree or X11 bugs, note in the console you need this option but enabling it can cause strange behavior and side effects, so use it with caution (user has to enable it themselves)
Anything else I haven't mentioned? Overhauling wine maybe? (havent looked into where it would need to be implemented)
Remember this is just an idea, feel free to shoot it down for whatever reason, but it would sure make things a whole lot easier for users...
===== -- Dustin Navea
Minor Contributor, http://www.winehq.com Bugzilla Janitor, http://bugs.winehq.com Network Admin, irc://irc.blynk.net (down)
__________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com