From: Alex F. <ale...@gm...> - 2010-02-17 15:54:18
|
Thanks for your help Viral. I am now having difficulty compiling with USE_MGL_NAMESPACE $ env CFLAGS=-DUSE_MGL_NAMESPACE ./configure $ make ... glxcmds.c:1577: error: ‘glXGetCurrentDisplayEXT’ aliased to undefined symbol ‘glXGetCurrentDisplay’ glxcmds.c:1728: error: ‘glXQueryContextInfoEXT’ aliased to undefined symbol ‘glXQueryContext’ glxcmds.c:2174: error: ‘glXGetFBConfigAttribSGIX’ aliased to undefined symbol ‘glXGetFBConfigAttrib’ glxcmds.c:2178: error: ‘glXChooseFBConfigSGIX’ aliased to undefined symbol ‘glXChooseFBConfig’ glxcmds.c:2183: error: ‘glXGetVisualFromFBConfigSGIX’ aliased to undefined symbol ‘glXGetVisualFromFBConfig’ glxcmds.c:3087: error: ‘mglXGetProcAddress’ aliased to undefined symbol ‘glXGetProcAddressARB’ The docs say that I should add "CFLAGS += -DUSE_MGL_NAMESPACE" to the relevant config. It seems that configure has added this to configs/autoconf: $ grep USE_MGL_NAMESPACE configs/* configs/autoconf:CFLAGS = -DUSE_MGL_NAMESPACE -Wall -Wmissing-prototypes -std=c99 -ffast-math -fno-strict-aliasing \ configs/current:CFLAGS = -DUSE_MGL_NAMESPACE -Wall -Wmissing-prototypes -std=c99 -ffast-math -fno-strict-aliasing \ Is this sufficient or should I add it manually to other configs? Thanks again in advance, Alex On Wed, Feb 17, 2010 at 1:24 PM, Viral Patel <Vir...@an...> wrote: > 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 > |