VTK
vtkOpenGLContextBufferId.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkOpenGLContextBufferId.h
5 
6  Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
7  All rights reserved.
8  See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
9 
10  This software is distributed WITHOUT ANY WARRANTY; without even
11  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
12  PURPOSE. See the above copyright notice for more information.
13 
14 =========================================================================*/
15 
25 #ifndef vtkOpenGLContextBufferId_h
26 #define vtkOpenGLContextBufferId_h
27 
28 #include "vtkRenderingContextOpenGL2Module.h" // For export macro
30 
31 class vtkTextureObject;
33 
34 class VTKRENDERINGCONTEXTOPENGL2_EXPORT vtkOpenGLContextBufferId : public vtkAbstractContextBufferId
35 {
36 public:
38  void PrintSelf(ostream &os, vtkIndent indent) VTK_OVERRIDE;
39 
43  static vtkOpenGLContextBufferId *New();
44 
48  void ReleaseGraphicsResources() VTK_OVERRIDE;
49 
51 
54  void SetContext(vtkRenderWindow *context) VTK_OVERRIDE;
55  vtkRenderWindow *GetContext() VTK_OVERRIDE;
57 
62  bool IsSupported() VTK_OVERRIDE;
63 
70  void Allocate() VTK_OVERRIDE;
71 
75  bool IsAllocated() const VTK_OVERRIDE;
76 
82  void SetValues(int srcXmin,
83  int srcYmin) VTK_OVERRIDE;
84 
93  vtkIdType GetPickedItem(int x, int y) VTK_OVERRIDE;
94 
95 protected:
97  ~vtkOpenGLContextBufferId() VTK_OVERRIDE;
98 
99  vtkOpenGLRenderWindow *Context;
100  vtkTextureObject *Texture;
101 
102 private:
103  vtkOpenGLContextBufferId(const vtkOpenGLContextBufferId &) VTK_DELETE_FUNCTION;
104  void operator=(const vtkOpenGLContextBufferId &) VTK_DELETE_FUNCTION;
105 };
106 
107 #endif // #ifndef vtkOpenGLContextBufferId_h
OpenGL rendering window.
2D array of ids stored in VRAM.
int vtkIdType
Definition: vtkType.h:345
static vtkAbstractContextBufferId * New()
virtual void ReleaseGraphicsResources()
Release any graphics resources that are being consumed by this object.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
a simple class to control print indentation
Definition: vtkIndent.h:33
2D array of ids, used for picking.
abstracts an OpenGL texture object.
create a window for renderers to draw into