[vtk-developers] vtkClipPlanesPainter

Cory Quammen cquammen at cs.unc.edu
Wed Feb 7 13:19:42 EST 2007


 > In short, painters might help you implement a multi-pass algorithm, but
> they probably won't get you all the way.  Surely there must be a better
> mechanism for setting up multi-pass algorithms, but I have not thought
> of one.
>
> -Ken
>

My solution for accessing framebuffer objects from VTK involves two
classes, vtkFBORenderer, a subclass of vtkOpenGLRenderer and
vtkFBOTexture, a subclass of vtkOpenGLTexture. To use these classes,
you first pass a vtkFBOTexture to the vtkFBORenderer. Then, you drop
the vtkFBORenderer in wherever you previously had a vtkRenderer.

Prior to rendering, the vtkFBORenderer invokes methods in
vtkFBOTexture to enable the FBO as the target framebuffer. After
rendering, another vtkFBOTexture method is called to set the target
framebuffer to the default one.

You can use the vtkFBOTexture just as you would any other vtkTexture.
To set up a multipass rendering algorithm, you could in principle use
several vtkFBOTextures that you pass in to your vtkFBORenderer at
various passes.

I've successfully used these classes in an application, both as simply
a replacement for the standard vtkOpenGLRenderer and for getting
access to floating-point blending.

Please let me know if you'd like to know more. I'd be happy to
contribute these as VTK classes.

Hope that helps,
Cory

-- 
Cory Quammen
Department of Computer Science
University of North Carolina at Chapel Hill
http://www.cs.unc.edu/~cquammen



More information about the vtk-developers mailing list