From: Viral P. <Vir...@an...> - 2010-02-17 14:25:01
|
Hi Alex, You can link in both Mesa and Non-Mesa gl implementations, the key is to use mesa in mangled mode, such that, when calling into mesa all gl calls are: mgl* but calling into non-mesa the calls are, gl* This either means you need to write all your code twice or preferably use function pointers/virtual interfaces to reference each implementation. You will also need to be careful to use mgl calls only when using with an OSMesa gl context. What you are currently doing is linking in 2 different libraries with the conflicting symbols, simplistically the linker is using some functions from mesa and some from nvogl. I would look at the mangled_* headers in mesa, and the mesa doc has a section on mangling the api entry points. Hope this helps. Viral Patel Ansys Inc, -----Original Message----- From: Alex Flint [mailto:ale...@gm...] Sent: 17 February 2010 12:27 To: mes...@li... Subject: [Mesa3d-users] using osmesa together with nvidia GL implementation Hi there, My program is happily linking to the nvidia OpenGL implementation for its normal onscreen rendering. I would like within a small part of this program to use the offscreen rendering capabilities of OSMesa. If I link to both /usr/lib/libGL.so and /usr/lib/libOSMesa.so then I get strange results: either my offscreen-rendered images are blank or GL crashes, depending on which order I do the linking. My first question is: is this even supposed to work? If so I will investigate further and post much more detailed info about what's going wrong. If not, is there any other way that I can get both 3D acceleration for onscreen rendering and (un-accelerated) offscreen rendering working in the same binary? Thanks in advance, Alex ------------------------------------------------------------------------ ------ SOLARIS 10 is the OS for Data Centers - provides features such as DTrace, Predictive Self Healing and Award Winning ZFS. Get Solaris 10 NOW http://p.sf.net/sfu/solaris-dev2dev _______________________________________________ Mesa3d-users mailing list Mes...@li... https://lists.sourceforge.net/lists/listinfo/mesa3d-users |