From: Karl Schultz <kschultz@rs...> - 2002-03-11 15:44:07
> -----Original Message-----
> From: Brian Paul [mailto:brian@...]
> Sent: Monday, March 11, 2002 7:58 AM
> To: mesa3d-users@...
> Subject: Re: [Mesa3d-users] Win32-Using Mesa and standard GL
> jan.fischer@... wrote:
> > Hello!
> > I'm working on a (Visual C++ 6) project in which I would
> like to use Mesa's
> > offscreen rendering capabilities. The problem is that I
> also have to use the
> > standard OpenGL libraries for OpenGL and Open Inventor rendering.
> > This obviously creates some problems because of the
> identical APIs of the
> > libraries.
> > My question is: Is there a simple way to "switch" between
> the two APIs, i.e. to
> > expicitly select Mesa OR standard OpenGL when e.g. calling
> > Or, as an alternative: Are there special versions of the
> Mesa GL commands
> > (like "mesa_glClear()" or something similar)?
> Yes, there's an option for that called "mangling". If you recompile
> Mesa with USE_MGL_NAMESPACE then all of Mesa's OpenGL entrypoints
> will start with "mgl" instead of "gl". How you switch between the
> mgl and gl calls in your application is up to you.
Yes, my app does this and it works very well.
One additional item to be aware of on the Windows platform is that you'll
need to modify the DLL def file (mesa.def) to export the mangled entry
points (e.g., mglClear instead of glClear). You'll only need to do this
when you build mesa. Since few people do this mangling, it isn't as
automated as the rest of the build.
Another tip is that you can turn on mangling in your application source code
too, which can help avoid duplicating a lot of code that differs only in the
mangling of the GL calls.
> Mesa3d-users mailing list