VTK  9.3.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 VTK_ABI_NAMESPACE_BEGIN
25 
27 
28 class VTKRENDERINGOPENXR_EXPORT vtkOpenXRManagerGraphics : public vtkObject
29 {
30 public:
32 
36  virtual void SetNumberOfSwapchains(uint32_t viewCount) = 0;
37 
39 
43  virtual void GetColorSwapchainImage(uint32_t eyeIndex, uint32_t imgIndex, void* texture) = 0;
44  virtual void GetDepthSwapchainImage(uint32_t eyeIndex, uint32_t imgIndex, void* texture) = 0;
46 
48 
52  virtual void EnumerateColorSwapchainImages(XrSwapchain swapchain, uint32_t eyeIndex) = 0;
53  virtual void EnumerateDepthSwapchainImages(XrSwapchain swapchain, uint32_t eyeIndex) = 0;
55 
59  uint32_t GetChainLength(XrSwapchain swapchain);
60 
62 
66  virtual const std::vector<int64_t>& GetSupportedColorFormats() = 0;
67  virtual const std::vector<int64_t>& GetSupportedDepthFormats() = 0;
69 
76  virtual bool CreateGraphicsBinding(vtkOpenGLRenderWindow* helperWindow) = 0;
77 
82  virtual const void* GetGraphicsBinding() = 0;
83 
89  virtual bool CheckGraphicsRequirements(XrInstance instance, XrSystemId id) = 0;
90 
94  virtual const char* GetBackendExtensionName() = 0;
95 
96 protected:
97  vtkOpenXRManagerGraphics() = default;
98  ~vtkOpenXRManagerGraphics() override = default;
99 
100 private:
102  void operator=(const vtkOpenXRManagerGraphics&) = delete;
103 };
104 
105 VTK_ABI_NAMESPACE_END
106 #endif
OpenGL rendering window.
abstract base class for most VTK objects
Definition: vtkObject.h:51
OpenXR manager graphics implementation.
Defines the OpenXR types and extensions common to all platforms.