combining OpenGL and Mesa
Stef Desmet
Stef.Desmet at esat.kuleuven.ac.be
Wed May 24 03:40:19 EDT 2000
Hello,
When VTK 3.* came with support for the Mesa offscreen renderer we wanted to be
able to decide at run time which graphica library to use (e.g. an OpenGL application on a SGI
using Mesa for the offscreen rendering). So we needed to compile both the OpenGL
and Mesa classes in our libs. Althought I did a configure --with-opengl --with-mesa
I needed to edit the system.make to add ${MESA_OBJ} at GRAPHICS_API_OBJ and -DVTK_USE_MESA
at GRAPHICS_API_FLAGS.
Everything worked well on sgi and alpha but not on Linux. Due to multiple defined symbols
in the VTK graphics lib it crashed when linking the VTK tcl binaries (warnings on the other
platforms). The problem is that
most Mesa classes are an exact copy of the OpenGL class just changing the class name with a
#define statement in the class .h file. However the vtkOpenGLPolyDataMapper class has some
helper function (vtkOpenGLBeginPolyTriangleOrQuad ... vtkOpenGLDrawNSTW) and because these are
no member functions the names are not changed by the #define statement of the preprocessor.
Because these are local functions for the class it is enough to declare them static to avoid
multiple definition errors in the libVTKGraphics file.
Is it possible to change this in the source code of vtkOpenGLPolyDataMapper.cxx ?
--
Stef Desmet
Katholieke Universiteit Leuven Tel. +32-16-321041
Departement Elektrotechniek - ESAT Fax. +32-16-321986
Centrum voor Beeld- en Spraakverwerking - PSI Telex 25914 ELEKUL
Kardinaal Mercierlaan 94 eMail stef.desmet at esat.kuleuven.ac.be
B-3001 Heverlee Leuven URL <http://www.esat.kuleuven.ac.be/~desmet>
B E L G I U M
----------------------------------------------------------------------
--------------------------------------------------------------------
This is the private VTK discussion list. Please keep messages on-topic.
Check the FAQ at: <http://public.kitware.com/cgi-bin/vtkfaq>
To UNSUBSCRIBE, send message body containing "unsubscribe vtkusers" to
<majordomo at public.kitware.com>. For help, send message body containing
"info vtkusers" to the same address.
--------------------------------------------------------------------
More information about the vtkusers
mailing list