For my particular application, I need 3D texture coordinates. VTK does
not currently support 3D textures (see
vtkPrimitivePainter.cxx:204-209). My solution was to create a subclass
of vtkPolyDataPainter, called vtk3DTexturePrimitivePainter, that
allows 3D texture coordinates to pass through it instead of nulling
them out like vtkPrimitivePainter. Getting this class to be used
instead of vtkPrimitivePainter required creating two more classes to
ensure that my class was being used, and a third to bind the 3D
texture. Since I am developing under Windows, I also needed to
introduce the macro GL_TEXTURE_3D using the GLee library and header
because it isn't defined in MSVC++ 2003.
My question is: is there an easier way? I could imagine modifying the
build system to check for a GLee installation (or perhaps GLEW), and
enclosing the pieces of code that use GLee in #ifdef statements. Or
maybe there should be a CMAKE variable that enables/disables
compilation of subclasses like those that I have created.
Is there any chance changes like these might make it into the VTK code
base? Any volunteers to work out the specifics?