VTK
Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions
vtkOpenGL2ContextDevice2D Class Reference

Class for drawing 2D primitives using OpenGL 2. More...

#include <vtkOpenGL2ContextDevice2D.h>

Inheritance diagram for vtkOpenGL2ContextDevice2D:
Inheritance graph
[legend]
Collaboration diagram for vtkOpenGL2ContextDevice2D:
Collaboration graph
[legend]

List of all members.

Public Types

typedef vtkOpenGLContextDevice2D Superclass

Public Member Functions

virtual int IsA (const char *type)
vtkOpenGL2ContextDevice2DNewInstance () const
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 (vtkObjectBase *o)
static vtkOpenGL2ContextDevice2DNew ()
static bool IsSupported (vtkViewport *viewport)

Protected Member Functions

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

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 42 of file vtkOpenGL2ContextDevice2D.h.


Member Typedef Documentation

Reimplemented from vtkOpenGLContextDevice2D.

Definition at line 46 of file vtkOpenGL2ContextDevice2D.h.


Constructor & Destructor Documentation


Member Function Documentation

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.

Reimplemented from vtkOpenGLContextDevice2D.

virtual vtkObjectBase* vtkOpenGL2ContextDevice2D::NewInstanceInternal ( ) const [protected, virtual]

Reimplemented from vtkOpenGLContextDevice2D.

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.

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: