winex11.drv: Only try to initialize OpenGL if the display has the GLX extension.

Patrik Stridvall patrik at stridvall.se
Sun Dec 24 17:04:26 CST 2006


On Sunday 24 December 2006 15:17, Roderick Colenbrander wrote:
> I have played a bit with Mesa and it indeed works fine without the GLX
> extension (just a software renderer ofcourse). I know what error you are
> seeing for instance the nvidia drivers output it when GLX isn't present. It
> really depends just on the opengl implementation. 

I see both a OpenGL library error and a Wine error.

> Perhaps the right thing 
> to do is to 'test' the OpenGL implementation by making a GLX call like
> glXQueryVersion or whatever. Errors can be caught using a
> X11DRV_expect_error. I fear that something like this is the only way.

Actually I think it is glXQueryVersion that fails... Not 100% sure though.

But OK perhaps it can be caught but the point that
1. Our implementation of OpenGL doesn't work without GLX. Initialization fails 
and it returns FALSE.
2. It output confusing messages.

So applying the patch won't break anything. Anybody wishing to make Wine
run OpenGL applications without GLX are welcome to submit additional patches.

> > On Sunday 24 December 2006 10:12, Roderick Colenbrander wrote:
> > > Hi,
> > >
> > > I'm not sure if checking for the GLX extension is such a good idea as
> > > it
> >
> > is
> >
> > > possible to use OpenGL without having the GLX extension. For instance
> >
> > when
> >
> > > plain Mesa is used.
> >
> > OK. The thing is that if I have the OpenGL libraries installed and I try
> > to
> > run Wine under VNC server I get I complaints that it doesn't have the GLX
> > extension. So I found some code that checks for the existence of the
> > extension.
> >
> > In any case the initialisation of OpenGL fails under VNC server so
> > something
> > needs to be fixed. But perhaps disabling it if GLX doesn't exist is too
> > brutal.
> >
> > What do you suggest?



More information about the wine-devel mailing list