vtkPVRenderingCapabilitiesInformation.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: ParaView
4  Module: vtkPVRenderingCapabilitiesInformation.h
5 
6  Copyright (c) Kitware, Inc.
7  All rights reserved.
8  See Copyright.txt or http://www.paraview.org/HTML/Copyright.html 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 =========================================================================*/
21 #ifndef vtkPVRenderingCapabilitiesInformation_h
22 #define vtkPVRenderingCapabilitiesInformation_h
23 
24 #include "vtkPVInformation.h"
25 #include "vtkRemotingViewsModule.h" //needed for exports
26 #include "vtkSmartPointer.h" // for vtkSmartPointer
27 #include <string> // for std::string
28 
29 class vtkRenderWindow;
30 
32 {
33 public:
36  void PrintSelf(ostream& os, vtkIndent indent) override;
37 
39  {
40  NONE = 0,
41 
45  ONSCREEN_RENDERING = 0x01,
46 
50  HEADLESS_RENDERING_USES_OSMESA = 0x04,
51 
55  HEADLESS_RENDERING_USES_EGL = 0x08,
56 
60  HEADLESS_RENDERING = HEADLESS_RENDERING_USES_OSMESA | HEADLESS_RENDERING_USES_EGL,
61 
65  RENDERING = ONSCREEN_RENDERING | HEADLESS_RENDERING,
66 
72  OPENGL = 0x10,
73  };
74 
80  vtkGetMacro(Capabilities, vtkTypeUInt32);
81 
85  bool Supports(vtkTypeUInt32 capability) { return (this->Capabilities & capability) != 0; }
86 
87  static bool Supports(vtkTypeUInt32 capabilities, vtkTypeUInt32 mask)
88  {
89  return (mask & capabilities) != 0;
90  }
91 
95  static vtkTypeUInt32 GetLocalCapabilities();
96 
111  static vtkSmartPointer<vtkRenderWindow> NewOffscreenRenderWindow();
112 
114  void CopyFromObject(vtkObject*) override;
115  void AddInformation(vtkPVInformation*) override;
116  void CopyToStream(vtkClientServerStream*) override;
117  void CopyFromStream(const vtkClientServerStream*) override;
118 
119 protected:
122 
123  vtkTypeUInt32 Capabilities;
124 
125 private:
127  void operator=(const vtkPVRenderingCapabilitiesInformation&) = delete;
128 };
129 
130 #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.