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 "vtkRenderingContextOpenGLModule.h" // For export macro
30 
31 class vtkTextureObject;
33 
34 class VTKRENDERINGCONTEXTOPENGL_EXPORT vtkOpenGLContextBufferId : public vtkAbstractContextBufferId
35 {
36 public:
38  virtual void PrintSelf(ostream &os, vtkIndent indent);
39 
44 
48  virtual void ReleaseGraphicsResources();
49 
51 
54  virtual void SetContext(vtkRenderWindow *context);
57 
62  virtual bool IsSupported();
63 
70  virtual void Allocate();
71 
75  virtual bool IsAllocated() const;
76 
82  virtual void SetValues(int srcXmin,
83  int srcYmin);
84 
93  virtual vtkIdType GetPickedItem(int x, int y);
94 
95 protected:
98 
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
2D array of ids, used for picking.
a simple class to control print indentation
Definition: vtkIndent.h:40
2D array of ids stored in VRAM.
virtual ~vtkOpenGLContextBufferId()
virtual vtkIdType GetPickedItem(int x, int y)
Return item under abscissa x and ordinate y.
vtkOpenGLRenderWindow * Context
virtual bool IsSupported()
Returns if the context supports the required extensions.
virtual void SetContext(vtkRenderWindow *context)
Set/Get the OpenGL context owning the texture object resource.
virtual void Allocate()
Allocate the memory for at least Width*Height elements.
virtual vtkRenderWindow * GetContext()
virtual void ReleaseGraphicsResources()
Release any graphics resources that are being consumed by this object.
static vtkOpenGLContextBufferId * New()
Creates a 2D Painter object.
virtual void SetValues(int srcXmin, int srcYmin)
Copy the contents of the current read buffer to the internal texture starting at lower left corner of...
virtual bool IsAllocated() const
Tell if the buffer has been allocated.
virtual void PrintSelf(ostream &os, vtkIndent indent)
Methods invoked by print to print information about the object including superclasses.
OpenGL rendering window.
create a window for renderers to draw into
abstracts an OpenGL texture object.
int vtkIdType
Definition: vtkType.h:287