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 
34 #ifndef vtkOpenGL2ContextDevice2D_h
35 #define vtkOpenGL2ContextDevice2D_h
36 
38 
39 class VTKRENDERINGCONTEXTOPENGL_EXPORT vtkOpenGL2ContextDevice2D :
41 {
42 public:
44  void PrintSelf(ostream &os, vtkIndent indent) VTK_OVERRIDE;
45 
50 
54  static bool IsSupported(vtkViewport *viewport);
55 
62  void DrawPointSprites(vtkImageData *sprite, float *points, int n,
63  unsigned char* colors = 0, int nc_comps = 0) VTK_OVERRIDE;
64 
69  void DrawImage(float p[2], float scale, vtkImageData *image) VTK_OVERRIDE;
70 
76  void DrawImage(const vtkRectf& pos, vtkImageData *image) VTK_OVERRIDE;
77 
84  void DrawPolyData(float p[2], float scale, vtkPolyData* polyData,
85  vtkUnsignedCharArray* colors, int scalarMode) VTK_OVERRIDE;
86 
92  void ReleaseGraphicsResources(vtkWindow *window) VTK_OVERRIDE;
93 
94 protected:
96  ~vtkOpenGL2ContextDevice2D() VTK_OVERRIDE;
97 
101  bool LoadExtensions(vtkOpenGLExtensionManager *m) VTK_OVERRIDE;
102 
103 private:
104  vtkOpenGL2ContextDevice2D(const vtkOpenGL2ContextDevice2D &) VTK_DELETE_FUNCTION;
105  void operator=(const vtkOpenGL2ContextDevice2D &) VTK_DELETE_FUNCTION;
106 };
107 
108 #endif //vtkOpenGL2ContextDevice2D_h
void DrawPointSprites(vtkImageData *sprite, float *points, int n, unsigned char *colors=0, int nc_comps=0) override
Draw a series of point sprites, images centred at the points supplied.
abstract specification for Viewports
Definition: vtkViewport.h:44
Class for drawing 2D primitives using OpenGL 1.1+.
concrete dataset represents vertices, lines, polygons, and triangle strips
Definition: vtkPolyData.h:79
static vtkOpenGLContextDevice2D * New()
Creates a 2D Painter object.
window superclass for vtkRenderWindow
Definition: vtkWindow.h:34
a simple class to control print indentation
Definition: vtkIndent.h:33
topologically and geometrically regular array of data
Definition: vtkImageData.h:39
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
Interface class for querying and using OpenGL extensions.
dynamic, self-adjusting array of unsigned char
Class for drawing 2D primitives using OpenGL 2.