VTK  9.3.20240327
vtkAbstractRenderDevice.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 #ifndef vtkAbstractRenderDevice_h
4 #define vtkAbstractRenderDevice_h
5 
6 #include "vtkObject.h"
7 #include "vtkRenderingCoreModule.h" // For export macro
8 #include <string> // For std::string
9 
10 VTK_ABI_NAMESPACE_BEGIN
11 class vtkRecti;
12 
13 class VTKRENDERINGCORE_EXPORT vtkAbstractRenderDevice : public vtkObject
14 {
15 public:
17  void PrintSelf(ostream& os, vtkIndent indent) override;
18 
25 
32  void SetRequestedGLVersion(int major, int minor);
33 
40  virtual bool CreateNewWindow(const vtkRecti& geometry, const std::string& name) = 0;
41 
47  virtual void MakeCurrent() = 0;
48 
49 protected:
52 
53  int GLMajor;
54  int GLMinor;
55 
56 private:
58  void operator=(const vtkAbstractRenderDevice&) = delete;
59 };
60 
61 VTK_ABI_NAMESPACE_END
62 #endif
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
void SetRequestedGLVersion(int major, int minor)
Set the context that should be requested (must be set before the widget is rendered for the first tim...
virtual void MakeCurrent()=0
Make the context current so that it can be used by OpenGL.
virtual bool CreateNewWindow(const vtkRecti &geometry, const std::string &name)=0
Create a window with the desired geometry.
~vtkAbstractRenderDevice() override
static vtkAbstractRenderDevice * New()
Make a new device, this class is abstract and one of its derived forms will be returned,...
a simple class to control print indentation
Definition: vtkIndent.h:108
abstract base class for most VTK objects
Definition: vtkObject.h:161
@ name
Definition: vtkX3D.h:219
@ string
Definition: vtkX3D.h:490