[vtkusers] What are all vtkOpenGL* classes used for?

Jana Sefcikova neollie at gmail.com
Tue Aug 14 05:14:34 EDT 2012


Hi, vtkRenderer and vtkRendererWindow are abstract classes. vtkOpenGLRenderer
& vtkOpenGLRenderWindow are concret implementation. vtkOpenGLRenderer is
used when VTK_USE_MANGLED_MESA is not defined.
vtkOpenGLRenderWindow has more
specifications<http://www.vtk.org/doc/nightly/html/classvtkOpenGLRenderWindow__inherit__graph.png>
.

When you call vtkRenderer::New() following code is called.

vtkRenderer *vtkRenderer::New()

{

  // First try to create the object from the vtkObjectFactory

  vtkObject* ret = vtkGraphicsFactory::CreateInstance("vtkRenderer");

  return static_cast<vtkRenderer *>(ret);

}

Same with render window.

vtkRenderWindow *vtkRenderWindow::New()

{

  // First try to create the object from the vtkObjectFactory

  vtkObject* ret = vtkGraphicsFactory::CreateInstance("vtkRenderWindow");

  return static_cast<vtkRenderWindow *>(ret);

}

File vtkGraphicsFactory.cxx contains all conditions necessary for choosing
appropriate implementation of rendered and render window. This file is core
response to your question.

So, you are directly working with certain types of concrete implementation
according your OS and parameters preset in cmake. Print your vtkRenderer
instance to see its class : rendered->Print(std::cout) .

J.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20120814/a0059e93/attachment.htm>


More information about the vtkusers mailing list