GTA3 crash :( -- RedHat 9

Lionel Ulmer lionel.ulmer at free.fr
Thu Aug 14 16:10:59 CDT 2003


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 - http://www.bbrox.org/



More information about the wine-devel mailing list