3D texture support in the works?

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

3D texture support in the works?

Cory Quammen
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?

Thanks,
Cory

--
Cory Quammen
University of North Carolina at Chapel Hill
RENCI/NSRG/Computer Science
100 Europa Drive
Suite 540
Chapel Hill, NC 27517
919.445.9666 Monday and Wednesday
http://www.cs.unc.edu/~cquammen
_______________________________________________
This is the private VTK discussion list.
Please keep messages on-topic. Check the FAQ at: http://www.vtk.org/Wiki/VTK_FAQ
Follow this link to subscribe/unsubscribe:
http://www.vtk.org/mailman/listinfo/vtkusers