FreeMat
vtkOpenGLPainterDeviceAdapter

Section: Visualization Toolkit Rendering Classes

Usage

An adapter between vtkPainter and the OpenGL rendering system. Only a handful of attributes with special meaning are supported. The OpenGL attribute used for each attribute is given below.

 vtkDataSetAttributes::NORMALS          glNormal
 vtkDataSetAttributes:::SCALARS         glColor
 vtkDataSetAttributes::TCOORDS          glTexCoord
 vtkDataSetAttributes::NUM_ATTRIBUTES   glVertex

To create an instance of class vtkOpenGLPainterDeviceAdapter, simply invoke its constructor as follows

  obj = vtkOpenGLPainterDeviceAdapter

Methods

The class vtkOpenGLPainterDeviceAdapter has several methods that can be used. They are listed below. Note that the documentation is translated automatically from the VTK sources, and may not be completely intelligible. When in doubt, consult the VTK website. In the methods listed below, obj is an instance of the vtkOpenGLPainterDeviceAdapter class.

  • string = obj.GetClassName ()
  • int = obj.IsA (string name)
  • vtkOpenGLPainterDeviceAdapter = obj.NewInstance ()
  • vtkOpenGLPainterDeviceAdapter = obj.SafeDownCast (vtkObject o)
  • obj.BeginPrimitive (int mode) - Converts mode from VTK_* to GL_* and calls glBegin.
  • obj.EndPrimitive () - Calls glEnd.
  • int = obj.IsAttributesSupported (int attribute) - Returns if the given attribute type is supported by the device. Returns 1 is supported, 0 otherwise.
  • obj.EnableAttributeArray (int index) - Calls glEnableClientState or glDisableClientState.
  • obj.DisableAttributeArray (int index) - Calls glEnableClientState or glDisableClientState.
  • obj.DrawArrays (int mode, vtkIdType first, vtkIdType count) - Calls glDrawArrays. Mode is converted from VTK_* to GL_*.
  • int = obj.Compatible (vtkRenderer renderer) - Returns true if renderer is a vtkOpenGLRenderer.
  • obj.MakeLighting (int mode) - Turns lighting on and off.
  • int = obj.QueryLighting () - Returns current lighting setting.
  • obj.MakeMultisampling (int mode) - Turns antialiasing on and off.
  • int = obj.QueryMultisampling () - Returns current antialiasing setting.
  • obj.MakeBlending (int mode) - Turns blending on and off.
  • int = obj.QueryBlending () - Returns current blending setting.
  • obj.MakeVertexEmphasis (bool mode) - Turns emphasis of vertices on or off for vertex selection. When emphasized verts are drawn nearer to the camera and are drawn larger than normal to make selection of them more reliable.
  • obj.MakeVertexEmphasisWithStencilCheck (int mode) -