00001 /*========================================================================= 00002 00003 Program: Visualization Toolkit 00004 Module: vtkOpenGLContextBufferId.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 00024 #ifndef __vtkOpenGLContextBufferId_h 00025 #define __vtkOpenGLContextBufferId_h 00026 00027 #include "vtkAbstractContextBufferId.h" 00028 00029 class vtkTextureObject; 00030 class vtkOpenGLRenderWindow; 00031 00032 class VTK_CHARTS_EXPORT vtkOpenGLContextBufferId : public vtkAbstractContextBufferId 00033 { 00034 public: 00035 vtkTypeMacro(vtkOpenGLContextBufferId, vtkAbstractContextBufferId); 00036 virtual void PrintSelf(ostream &os, vtkIndent indent); 00037 00039 static vtkOpenGLContextBufferId *New(); 00040 00043 virtual void ReleaseGraphicsResources(); 00044 00046 00047 void SetContext(vtkOpenGLRenderWindow *context); 00048 vtkOpenGLRenderWindow *GetContext(); 00050 00053 bool IsSupported(); 00054 00058 virtual void Allocate(); 00059 00061 virtual bool IsAllocated() const; 00062 00064 00067 virtual void SetValues(int srcXmin, 00068 int srcYmin); 00070 00075 virtual vtkIdType GetPickedItem(int x, int y); 00076 00077 protected: 00078 vtkOpenGLContextBufferId(); 00079 virtual ~vtkOpenGLContextBufferId(); 00080 00081 vtkOpenGLRenderWindow *Context; 00082 vtkTextureObject *Texture; 00083 00084 private: 00085 vtkOpenGLContextBufferId(const vtkOpenGLContextBufferId &); // Not implemented. 00086 void operator=(const vtkOpenGLContextBufferId &); // Not implemented. 00087 }; 00088 00089 #endif // #ifndef __vtkOpenGLContextBufferId_h