VTK
|
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 "vtkRenderingContext2DModule.h" // For export macro 00028 #include "vtkAbstractContextBufferId.h" 00029 00030 class vtkTextureObject; 00031 class vtkOpenGLRenderWindow; 00032 00033 class VTKRENDERINGCONTEXT2D_EXPORT vtkOpenGLContextBufferId : public vtkAbstractContextBufferId 00034 { 00035 public: 00036 vtkTypeMacro(vtkOpenGLContextBufferId, vtkAbstractContextBufferId); 00037 virtual void PrintSelf(ostream &os, vtkIndent indent); 00038 00040 static vtkOpenGLContextBufferId *New(); 00041 00044 virtual void ReleaseGraphicsResources(); 00045 00047 00048 void SetContext(vtkOpenGLRenderWindow *context); 00049 vtkOpenGLRenderWindow *GetContext(); 00051 00054 bool IsSupported(); 00055 00059 virtual void Allocate(); 00060 00062 virtual bool IsAllocated() const; 00063 00065 00068 virtual void SetValues(int srcXmin, 00069 int srcYmin); 00071 00076 virtual vtkIdType GetPickedItem(int x, int y); 00077 00078 protected: 00079 vtkOpenGLContextBufferId(); 00080 virtual ~vtkOpenGLContextBufferId(); 00081 00082 vtkOpenGLRenderWindow *Context; 00083 vtkTextureObject *Texture; 00084 00085 private: 00086 vtkOpenGLContextBufferId(const vtkOpenGLContextBufferId &); // Not implemented. 00087 void operator=(const vtkOpenGLContextBufferId &); // Not implemented. 00088 }; 00089 00090 #endif // #ifndef __vtkOpenGLContextBufferId_h