VTK
vtkOpenGL2ContextDevice2D.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkOpenGL2ContextDevice2D.h
5 
6  Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
7  All rights reserved.
8  See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
9 
10  This software is distributed WITHOUT ANY WARRANTY; without even
11  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
12  PURPOSE. See the above copyright notice for more information.
13 
14 =========================================================================*/
15 
37 #ifndef vtkOpenGL2ContextDevice2D_h
38 #define vtkOpenGL2ContextDevice2D_h
39 
41 
42 class VTKRENDERINGCONTEXTOPENGL_EXPORT vtkOpenGL2ContextDevice2D :
44 {
45 public:
47  virtual void PrintSelf(ostream &os, vtkIndent indent);
48 
53 
57  static bool IsSupported(vtkViewport *viewport);
58 
65  virtual void DrawPointSprites(vtkImageData *sprite, float *points, int n,
66  unsigned char* colors = 0, int nc_comps = 0);
67 
72  virtual void DrawImage(float p[2], float scale, vtkImageData *image);
73 
79  void DrawImage(const vtkRectf& pos, vtkImageData *image);
80 
86  virtual void ReleaseGraphicsResources(vtkWindow *window);
87 
88 protected:
91 
96 
97 private:
98  vtkOpenGL2ContextDevice2D(const vtkOpenGL2ContextDevice2D &) VTK_DELETE_FUNCTION;
99  void operator=(const vtkOpenGL2ContextDevice2D &) VTK_DELETE_FUNCTION;
100 };
101 
102 #endif //vtkOpenGL2ContextDevice2D_h
vtkOpenGL2ContextDevice2D
Class for drawing 2D primitives using OpenGL 2.
Definition: vtkOpenGL2ContextDevice2D.h:44
vtkX3D::scale
@ scale
Definition: vtkX3D.h:229
vtkOpenGLContextDevice2D.h
vtkX3D::image
@ image
Definition: vtkX3D.h:374
vtkOpenGL2ContextDevice2D::New
static vtkOpenGL2ContextDevice2D * New()
Creates a 2D Painter object.
vtkOpenGL2ContextDevice2D::LoadExtensions
virtual bool LoadExtensions(vtkOpenGLExtensionManager *m)
Load the OpenGL extensions we need.
vtkOpenGL2ContextDevice2D::ReleaseGraphicsResources
virtual void ReleaseGraphicsResources(vtkWindow *window)
Release any graphics resources that are being consumed by this device.
vtkOpenGL2ContextDevice2D::~vtkOpenGL2ContextDevice2D
virtual ~vtkOpenGL2ContextDevice2D()
vtkOpenGL2ContextDevice2D::DrawImage
void DrawImage(const vtkRectf &pos, vtkImageData *image)
Draw the supplied image at the given position.
vtkWindow
window superclass for vtkRenderWindow
Definition: vtkWindow.h:35
vtkOpenGL2ContextDevice2D::DrawImage
virtual void DrawImage(float p[2], float scale, vtkImageData *image)
Draw the supplied image at the given x, y (p[0], p[1]) (bottom corner), scaled by scale (1....
vtkX3D::points
@ points
Definition: vtkX3D.h:446
vtkOpenGLExtensionManager
Interface class for querying and using OpenGL extensions.
vtkOpenGLContextDevice2D
Class for drawing 2D primitives using OpenGL 1.1+.
Definition: vtkOpenGLContextDevice2D.h:46
vtkImageData
topologically and geometrically regular array of data
Definition: vtkImageData.h:46
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:40
vtkOpenGL2ContextDevice2D::PrintSelf
virtual void PrintSelf(ostream &os, vtkIndent indent)
Methods invoked by print to print information about the object including superclasses.
vtkViewport
abstract specification for Viewports
Definition: vtkViewport.h:48
vtkOpenGL2ContextDevice2D::IsSupported
static bool IsSupported(vtkViewport *viewport)
Return true if the current rendering context supports this device.
vtkOpenGL2ContextDevice2D::DrawPointSprites
virtual void DrawPointSprites(vtkImageData *sprite, float *points, int n, unsigned char *colors=0, int nc_comps=0)
Draw a series of point sprites, images centred at the points supplied.
vtkOpenGL2ContextDevice2D::vtkOpenGL2ContextDevice2D
vtkOpenGL2ContextDevice2D()
vtkRectf
Definition: vtkRect.h:297