VTK  9.3.0
vtkOpenGLContextBufferId.h
Go to the documentation of this file.
1 // SPDX-FileCopyrightText: Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
2 // SPDX-License-Identifier: BSD-3-Clause
3 
13 #ifndef vtkOpenGLContextBufferId_h
14 #define vtkOpenGLContextBufferId_h
15 
17 #include "vtkRenderingContextOpenGL2Module.h" // For export macro
18 
19 VTK_ABI_NAMESPACE_BEGIN
20 class vtkTextureObject;
22 
23 class VTKRENDERINGCONTEXTOPENGL2_EXPORT vtkOpenGLContextBufferId : public vtkAbstractContextBufferId
24 {
25 public:
27  void PrintSelf(ostream& os, vtkIndent indent) override;
28 
33 
37  void ReleaseGraphicsResources() override;
38 
40 
43  void SetContext(vtkRenderWindow* context) override;
46 
51  bool IsSupported() override;
52 
59  void Allocate() override;
60 
64  bool IsAllocated() const override;
65 
71  void SetValues(int srcXmin, int srcYmin) override;
72 
81  vtkIdType GetPickedItem(int x, int y) override;
82 
83 protected:
86 
89 
90 private:
92  void operator=(const vtkOpenGLContextBufferId&) = delete;
93 };
94 
95 VTK_ABI_NAMESPACE_END
96 #endif // #ifndef vtkOpenGLContextBufferId_h
2D array of ids, used for picking.
a simple class to control print indentation
Definition: vtkIndent.h:29
2D array of ids stored in VRAM.
~vtkOpenGLContextBufferId() override
void Allocate() override
Allocate the memory for at least Width*Height elements.
vtkOpenGLRenderWindow * Context
bool IsAllocated() const override
Tell if the buffer has been allocated.
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...
void SetContext(vtkRenderWindow *context) override
Set/Get the OpenGL context owning the texture object resource.
bool IsSupported() override
Returns if the context supports the required extensions.
static vtkOpenGLContextBufferId * New()
Creates a 2D Painter object.
vtkIdType GetPickedItem(int x, int y) override
Return item under abscissa x and ordinate y.
void ReleaseGraphicsResources() override
Release any graphics resources that are being consumed by this object.
vtkRenderWindow * GetContext() override
Set/Get the OpenGL context owning the texture object resource.
void PrintSelf(ostream &os, vtkIndent indent) override
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:315