VTK
dox/Rendering/Context2D/vtkOpenGL2ContextDevice2D.h
Go to the documentation of this file.
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 "vtkRenderingContext2DModule.h" // For export macro
00040 #include "vtkOpenGLContextDevice2D.h"
00041 
00042 class VTKRENDERINGCONTEXT2D_EXPORT vtkOpenGL2ContextDevice2D :
00043     public vtkOpenGLContextDevice2D
00044 {
00045 public:
00046   vtkTypeMacro(vtkOpenGL2ContextDevice2D, vtkOpenGLContextDevice2D);
00047   virtual void PrintSelf(ostream &os, vtkIndent indent);
00048 
00050   static vtkOpenGL2ContextDevice2D *New();
00051 
00053   static bool IsSupported(vtkViewport *viewport);
00054 
00056 
00060   virtual void DrawPointSprites(vtkImageData *sprite, float *points, int n,
00061                                 unsigned char* colors = 0, int nc_comps = 0);
00063 
00066   virtual void DrawImage(float p[2], float scale, vtkImageData *image);
00067 
00071   void DrawImage(const vtkRectf& pos, vtkImageData *image);
00072 
00076   virtual void ReleaseGraphicsResources(vtkWindow *window);
00077 
00078 protected:
00079   vtkOpenGL2ContextDevice2D();
00080   virtual ~vtkOpenGL2ContextDevice2D();
00081 
00083   virtual bool LoadExtensions(vtkOpenGLExtensionManager *m);
00084 
00085 private:
00086   vtkOpenGL2ContextDevice2D(const vtkOpenGL2ContextDevice2D &); // Not implemented.
00087   void operator=(const vtkOpenGL2ContextDevice2D &);   // Not implemented.
00088 };
00089 
00090 #endif //__vtkOpenGL2ContextDevice2D_h