VTK  9.3.1
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 
32  static vtkOpenGLContextBufferId* New();
33 
37  void ReleaseGraphicsResources() override;
38 
40 
43  void SetContext(vtkRenderWindow* context) override;
44  vtkRenderWindow* GetContext() 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:
85  ~vtkOpenGLContextBufferId() override;
86 
89 
90 private:
92  void operator=(const vtkOpenGLContextBufferId&) = delete;
93 };
94 
95 VTK_ABI_NAMESPACE_END
96 #endif // #ifndef vtkOpenGLContextBufferId_h
OpenGL rendering window.
virtual vtkIdType GetPickedItem(int x, int y)=0
Return item under abscissa x and ordinate y.
virtual void SetContext(vtkRenderWindow *context)=0
Set/Get the OpenGL context owning the texture object resource.
2D array of ids stored in VRAM.
int vtkIdType
Definition: vtkType.h:315
virtual void Allocate()=0
Allocate the memory for at least Width*Height elements.
vtkOpenGLRenderWindow * Context
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:28
virtual void SetValues(int srcXmin, int srcYmin)=0
Copy the contents of the current read buffer to the internal structure starting at lower left corner ...
virtual bool IsAllocated() const =0
Tell if the buffer has been allocated.
2D array of ids, used for picking.
abstracts an OpenGL texture object.
create a window for renderers to draw into
virtual bool IsSupported()=0
Returns if the context supports the required extensions.
virtual vtkRenderWindow * GetContext()=0
Set/Get the OpenGL context owning the texture object resource.