vtkPVRenderingCapabilitiesInformation.h
Go to the documentation of this file.
1 // SPDX-FileCopyrightText: Copyright (c) Kitware Inc.
2 // SPDX-License-Identifier: BSD-3-Clause
9 #ifndef vtkPVRenderingCapabilitiesInformation_h
10 #define vtkPVRenderingCapabilitiesInformation_h
11 
12 #include "vtkPVInformation.h"
13 #include "vtkRemotingViewsModule.h" //needed for exports
14 #include "vtkSmartPointer.h" // for vtkSmartPointer
15 #include <string> // for std::string
16 
17 class vtkRenderWindow;
18 
20 {
21 public:
24  void PrintSelf(ostream& os, vtkIndent indent) override;
25 
27  {
28  NONE = 0,
29 
33  ONSCREEN_RENDERING = 0x01,
34 
38  HEADLESS_RENDERING_USES_OSMESA = 0x04,
39 
43  HEADLESS_RENDERING_USES_EGL = 0x08,
44 
48  HEADLESS_RENDERING = HEADLESS_RENDERING_USES_OSMESA | HEADLESS_RENDERING_USES_EGL,
49 
53  RENDERING = ONSCREEN_RENDERING | HEADLESS_RENDERING,
54 
60  OPENGL = 0x10,
61  };
62 
68  vtkGetMacro(Capabilities, vtkTypeUInt32);
69 
73  bool Supports(vtkTypeUInt32 capability) { return (this->Capabilities & capability) != 0; }
74 
75  static bool Supports(vtkTypeUInt32 capabilities, vtkTypeUInt32 mask)
76  {
77  return (mask & capabilities) != 0;
78  }
79 
83  static vtkTypeUInt32 GetLocalCapabilities();
84 
99  static vtkSmartPointer<vtkRenderWindow> NewOffscreenRenderWindow();
100 
102  void CopyFromObject(vtkObject*) override;
103  void AddInformation(vtkPVInformation*) override;
104  void CopyToStream(vtkClientServerStream*) override;
105  void CopyFromStream(const vtkClientServerStream*) override;
106 
107 protected:
110 
111  vtkTypeUInt32 Capabilities;
112 
113 private:
115  void operator=(const vtkPVRenderingCapabilitiesInformation&) = delete;
116 };
117 
118 #endif
virtual void CopyFromStream(const vtkClientServerStream *)
Manage a serialized version of the information.
#define VTKREMOTINGVIEWS_EXPORT
void PrintSelf(ostream &os, vtkIndent indent) override
static bool Supports(vtkTypeUInt32 capabilities, vtkTypeUInt32 mask)
Store messages for the interpreter.
const int NONE
void operator=(const vtkPVInformation &)=delete
provides information about rendering capabilities.
virtual void AddInformation(vtkPVInformation *)
Merge another information object.
virtual void CopyToStream(vtkClientServerStream *)=0
Manage a serialized version of the information.
virtual void CopyFromObject(vtkObject *)
Transfer information about a single object into this object.
static vtkObject * New()
Superclass for information objects.
bool Supports(vtkTypeUInt32 capability)
Convenience method to check is any of the requested capabilities are supported.