00001 /*========================================================================= 00002 00003 Program: Visualization Toolkit 00004 Module: vtkOpenGL2ContextDevice2D.h 00005 00006 Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen 00007 All rights reserved. 00008 See Copyright.txt or http://www.kitware.com/Copyright.htm for details. 00009 00010 This software is distributed WITHOUT ANY WARRANTY; without even 00011 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 00012 PURPOSE. See the above copyright notice for more information. 00013 00014 =========================================================================*/ 00015 00036 #ifndef __vtkOpenGL2ContextDevice2D_h 00037 #define __vtkOpenGL2ContextDevice2D_h 00038 00039 #include "vtkOpenGLContextDevice2D.h" 00040 00041 class VTK_CHARTS_EXPORT vtkOpenGL2ContextDevice2D : 00042 public vtkOpenGLContextDevice2D 00043 { 00044 public: 00045 vtkTypeMacro(vtkOpenGL2ContextDevice2D, vtkOpenGLContextDevice2D); 00046 virtual void PrintSelf(ostream &os, vtkIndent indent); 00047 00049 static vtkOpenGL2ContextDevice2D *New(); 00050 00052 static bool IsSupported(vtkViewport *viewport); 00053 00055 00059 virtual void DrawPointSprites(vtkImageData *sprite, float *points, int n, 00060 unsigned char* colors = 0, int nc_comps = 0); 00062 00065 virtual void DrawImage(float p[2], float scale, vtkImageData *image); 00066 00070 void DrawImage(const vtkRectf& pos, vtkImageData *image); 00071 00075 virtual void ReleaseGraphicsResources(vtkWindow *window); 00076 00077 protected: 00078 vtkOpenGL2ContextDevice2D(); 00079 virtual ~vtkOpenGL2ContextDevice2D(); 00080 00082 virtual bool LoadExtensions(vtkOpenGLExtensionManager *m); 00083 00084 private: 00085 vtkOpenGL2ContextDevice2D(const vtkOpenGL2ContextDevice2D &); // Not implemented. 00086 void operator=(const vtkOpenGL2ContextDevice2D &); // Not implemented. 00087 }; 00088 00089 #endif //__vtkOpenGL2ContextDevice2D_h