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