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 virtual void Allocate(); 00054 00056 virtual bool IsAllocated() const; 00057 00059 00062 virtual void SetValues(int srcXmin, 00063 int srcYmin); 00065 00070 virtual vtkIdType GetPickedItem(int x, int y); 00071 00072 protected: 00073 vtkOpenGLContextBufferId(); 00074 virtual ~vtkOpenGLContextBufferId(); 00075 00076 vtkOpenGLRenderWindow *Context; 00077 vtkTextureObject *Texture; 00078 00079 private: 00080 vtkOpenGLContextBufferId(const vtkOpenGLContextBufferId &); // Not implemented. 00081 void operator=(const vtkOpenGLContextBufferId &); // Not implemented. 00082 }; 00083 00084 #endif // #ifndef __vtkOpenGLContextBufferId_h