vtkOpenGL2ContextDevice2D Class Reference

#include <vtkOpenGL2ContextDevice2D.h>

Inheritance diagram for vtkOpenGL2ContextDevice2D:

Inheritance graph
[legend]
Collaboration diagram for vtkOpenGL2ContextDevice2D:

Collaboration graph
[legend]

List of all members.


Detailed Description

Class for drawing 2D primitives using OpenGL 2.

This class takes care of drawing the 2D primitives for the vtkContext2D class. In general this class should not be used directly, but called by vtkContext2D which takes care of many of the higher level details.

It assumes that OpenGL 2 is available, which is taken care of by the vtkContextActor class. If OpenGL 2 is not available, but OpenGL rendering is required the vtkOpenGLContextDevice2D class should be used (employs GL 1.1).

See also:
vtkOpenGLContextDevice2D
Tests:
vtkOpenGL2ContextDevice2D (Tests)

Definition at line 41 of file vtkOpenGL2ContextDevice2D.h.


Public Types

typedef vtkOpenGLContextDevice2D Superclass

Public Member Functions

virtual const char * GetClassName ()
virtual int IsA (const char *type)
virtual void PrintSelf (ostream &os, vtkIndent indent)
virtual void DrawImage (float p[2], float scale, vtkImageData *image)
void DrawImage (const vtkRectf &pos, vtkImageData *image)
virtual void ReleaseGraphicsResources (vtkWindow *window)
virtual void DrawPointSprites (vtkImageData *sprite, float *points, int n, unsigned char *colors=0, int nc_comps=0)

Static Public Member Functions

static int IsTypeOf (const char *type)
static vtkOpenGL2ContextDevice2DSafeDownCast (vtkObject *o)
static vtkOpenGL2ContextDevice2DNew ()
static bool IsSupported (vtkViewport *viewport)

Protected Member Functions

 vtkOpenGL2ContextDevice2D ()
virtual ~vtkOpenGL2ContextDevice2D ()
virtual bool LoadExtensions (vtkOpenGLExtensionManager *m)

Member Typedef Documentation

Reimplemented from vtkOpenGLContextDevice2D.

Definition at line 45 of file vtkOpenGL2ContextDevice2D.h.


Constructor & Destructor Documentation

vtkOpenGL2ContextDevice2D::vtkOpenGL2ContextDevice2D (  )  [protected]

virtual vtkOpenGL2ContextDevice2D::~vtkOpenGL2ContextDevice2D (  )  [protected, virtual]


Member Function Documentation

virtual const char* vtkOpenGL2ContextDevice2D::GetClassName (  )  [virtual]

Reimplemented from vtkOpenGLContextDevice2D.

static int vtkOpenGL2ContextDevice2D::IsTypeOf ( const char *  name  )  [static]

Return 1 if this class type is the same type of (or a subclass of) the named class. Returns 0 otherwise. This method works in combination with vtkTypeMacro found in vtkSetGet.h.

Reimplemented from vtkOpenGLContextDevice2D.

virtual int vtkOpenGL2ContextDevice2D::IsA ( const char *  name  )  [virtual]

Return 1 if this class is the same type of (or a subclass of) the named class. Returns 0 otherwise. This method works in combination with vtkTypeMacro found in vtkSetGet.h.

Reimplemented from vtkOpenGLContextDevice2D.

static vtkOpenGL2ContextDevice2D* vtkOpenGL2ContextDevice2D::SafeDownCast ( vtkObject o  )  [static]

Reimplemented from vtkOpenGLContextDevice2D.

virtual void vtkOpenGL2ContextDevice2D::PrintSelf ( ostream &  os,
vtkIndent  indent 
) [virtual]

Methods invoked by print to print information about the object including superclasses. Typically not called by the user (use Print() instead) but used in the hierarchical print process to combine the output of several classes.

Reimplemented from vtkOpenGLContextDevice2D.

static vtkOpenGL2ContextDevice2D* vtkOpenGL2ContextDevice2D::New (  )  [static]

Creates a 2D Painter object.

Reimplemented from vtkOpenGLContextDevice2D.

static bool vtkOpenGL2ContextDevice2D::IsSupported ( vtkViewport viewport  )  [static]

Return true if the current rendering context supports this device.

virtual void vtkOpenGL2ContextDevice2D::DrawPointSprites ( vtkImageData sprite,
float *  points,
int  n,
unsigned char *  colors = 0,
int  nc_comps = 0 
) [virtual]

Draw a series of point sprites, images centred at the points supplied. The supplied vtkImageData is the sprite to be drawn, only squares will be drawn and the size is set using SetPointSize. Points are colored by colors array which has nc_comps components

Reimplemented from vtkOpenGLContextDevice2D.

virtual void vtkOpenGL2ContextDevice2D::DrawImage ( float  p[2],
float  scale,
vtkImageData image 
) [virtual]

Draw the supplied image at the given x, y (p[0], p[1]) (bottom corner), scaled by scale (1.0 would match the image).

Reimplemented from vtkOpenGLContextDevice2D.

void vtkOpenGL2ContextDevice2D::DrawImage ( const vtkRectf pos,
vtkImageData image 
) [virtual]

Draw the supplied image at the given position. The origin, width, and height are specified by the supplied vtkRectf variable pos. The image will be drawn scaled to that size.

Reimplemented from vtkOpenGLContextDevice2D.

virtual void vtkOpenGL2ContextDevice2D::ReleaseGraphicsResources ( vtkWindow window  )  [virtual]

Release any graphics resources that are being consumed by this device. The parameter window could be used to determine which graphic resources to release.

Reimplemented from vtkOpenGLContextDevice2D.

virtual bool vtkOpenGL2ContextDevice2D::LoadExtensions ( vtkOpenGLExtensionManager m  )  [protected, virtual]

Load the OpenGL extensions we need.

Reimplemented from vtkOpenGLContextDevice2D.


The documentation for this class was generated from the following file:

Generated on Wed Aug 24 11:50:48 2011 for VTK by  doxygen 1.5.6