VTK  9.7.1
vtkOpenXRManagerGraphics.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
16 #ifndef vtkOpenXRManagerGraphics_h
17 #define vtkOpenXRManagerGraphics_h
18 
19 #include "vtkObject.h"
20 #include "vtkRenderingOpenXRModule.h" // For export macro
21 
22 #include "vtkOpenXR.h" // For OpenXR types
23 #include <vector> // For std::vector
24 
25 namespace vtk::detail
26 {
27 VTK_ABI_NAMESPACE_BEGIN
28 class vtkOpenXRManager;
29 VTK_ABI_NAMESPACE_END
30 }
31 
32 VTK_ABI_NAMESPACE_BEGIN
34 
35 class VTKRENDERINGOPENXR_EXPORT vtkOpenXRManagerGraphics : public vtkObject
36 {
37 public:
39 
43  virtual void SetNumberOfSwapchains(uint32_t viewCount) = 0;
44 
46 
50  virtual void GetColorSwapchainImage(uint32_t eyeIndex, uint32_t imgIndex, void* texture) = 0;
51  virtual void GetDepthSwapchainImage(uint32_t eyeIndex, uint32_t imgIndex, void* texture) = 0;
53 
55 
59  virtual void EnumerateColorSwapchainImages(XrSwapchain swapchain, uint32_t eyeIndex) = 0;
60  virtual void EnumerateDepthSwapchainImages(XrSwapchain swapchain, uint32_t eyeIndex) = 0;
62 
66  uint32_t GetChainLength(XrSwapchain swapchain);
67 
69 
73  virtual const std::vector<int64_t>& GetSupportedColorFormats() = 0;
74  virtual const std::vector<int64_t>& GetSupportedDepthFormats() = 0;
76 
83  virtual bool CreateGraphicsBinding(vtkOpenGLRenderWindow* helperWindow) = 0;
84 
89  virtual const void* GetGraphicsBinding() = 0;
90 
94  virtual const char* GetBackendExtensionName() = 0;
95 
96 protected:
97  vtkOpenXRManagerGraphics() = default;
98  ~vtkOpenXRManagerGraphics() override = default;
99 
104  virtual bool CheckGraphicsRequirements(vtk::detail::vtkOpenXRManager& manager) = 0;
105  friend class vtk::detail::vtkOpenXRManager; // for vtkOpenXRManager::Initialize
106 
107 private:
109  void operator=(const vtkOpenXRManagerGraphics&) = delete;
110 };
111 
112 VTK_ABI_NAMESPACE_END
113 #endif
OpenGL rendering window.
Singleton class that holds a collection of utility functions and member variables to communicate with...
abstract base class for most VTK objects
Definition: vtkObject.h:52
OpenXR manager graphics implementation.
Defines the OpenXR types and extensions common to all platforms.