Blender V5.3
GHOST_XrSwapchain.hh
Go to the documentation of this file.
1/* SPDX-FileCopyrightText: 2002-2023 Blender Authors
2 *
3 * SPDX-License-Identifier: GPL-2.0-or-later */
4
8
9#pragma once
10
11#include <memory>
12
14
16 public:
18 const XrSession &session,
19 const XrViewConfigurationView &view_config);
22
23 XrSwapchainImageBaseHeader *acquireDrawableSwapchainImage();
24 void releaseImage();
25
26 void updateCompositionLayerProjectViewSubImage(XrSwapchainSubImage &r_sub_image);
27
28 GHOST_TXrSwapchainFormat getFormat() const;
38 int64_t getGPUFormat() const;
39 bool isBufferSRGB() const;
40
41 private:
42 std::unique_ptr<OpenXRSwapchainData> oxr_; /* Could use stack, but PImpl is preferable. */
43 int32_t image_width_, image_height_;
44 GHOST_TXrSwapchainFormat format_;
45 int64_t gpu_format_;
46 bool is_srgb_buffer_ = false;
47};
long long int int64_t
int64_t getGPUFormat() const
return the swapchain format selected by the graphic binding.
GHOST_XrSwapchain(GHOST_IXrGraphicsBinding &gpu_binding, const XrSession &session, const XrViewConfigurationView &view_config)
GHOST_TXrSwapchainFormat getFormat() const
void updateCompositionLayerProjectViewSubImage(XrSwapchainSubImage &r_sub_image)
XrSwapchainImageBaseHeader * acquireDrawableSwapchainImage()