Re: Switching from an onscreen glx context to an osmesa context

tom fogal <[email protected]>
Newsgroups gmane.comp.video.mesa3d.user
Message-ID <[email protected]>
Paul Gotzel <[email protected]> writes:
> Hello,
> 
> I've taken on the task of upgrading from mesa 7.6.1 to 7.10.3 and come
> across what seems to be a regression.  I'm building on linux_x86-64 with gcc
> 4.5.1 and the following config:
> configure --prefix=/u/vm-RHwin7-pa03/people/paulg/clones/install/mesa/
> --with-driver=xlib --disable-gles1 --disable-gles2 --disable-egl
> --disable-gallium

Is it actually possible to link both the libGL and libOSMesa you get
from a similar configuration into the same application?  I would think
they both define e.g. glBegin.  For one, you'll call the gl* that gets
-l'd first in the link line, and I am not sure it makes sense that the
same entry point could be used for both OSMesa and glX anyway.

I think you should mangle OSMesa and use that to differentiate which
library to call.

-tom

> The problem happens when I switch between a mesa glx context to a osmesa
> context, the OSMesaMakeCurrent succeeds but ends up using the onscreen glx
> context for rendering.  The basic sequence of calls is as follows:
> 
> glxCreateContext
> glxMakeCurrent
> ... OpenGL commands ...
> OSMesaCreateContext
> OSMesaMakeCurrent
> ... OpenGL commands ...  <-- these commands render single buffered on the
> previous context.
> 
> I can workaround this by inserting a glxDestroyContext before the
> OSMesaMakeCurrent but I'm switching between the contexts in a loop so I'm
> hoping there is something I'm missing.  Any ideas?  This was not a problem
> in 7.6.1 but maybe I just got lucky.
> 
> Any help is appreciated.
> 
> Regards,
> Paul
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.