diff options
author | Kristoffer Skau <kristoffer.skau@qt.io> | 2022-10-25 22:30:15 +0200 |
---|---|---|
committer | Kristoffer Skau <kristoffer.skau@qt.io> | 2022-11-07 09:08:44 +0100 |
commit | c9ad5ad3b73ff60e9a40173b1ae49e67800a4b72 (patch) | |
tree | d5e2c7e2ad0c9e597b8c2d2922f37e33aa8dde1f /src/gui/rhi/qrhi_p.h | |
parent | 516871d3e5d7815c0fb4a93c71f8cb35f7b3325c (diff) |
Add support for stereoscopic content in QRhi::OpenGLES2
Setting the flag QSurfaceFormat::StereoBuffers does not actually do
anything, because we do not utilize the extra buffers provided. We need
to expose setting the correct buffers using glDrawBuffers between draw
calls.
Change-Id: I6a5110405e621030ac3a2886fa83df0cfe928723
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
Diffstat (limited to 'src/gui/rhi/qrhi_p.h')
-rw-r--r-- | src/gui/rhi/qrhi_p.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/gui/rhi/qrhi_p.h b/src/gui/rhi/qrhi_p.h index 1d32d08e84..5ee0d6e1fd 100644 --- a/src/gui/rhi/qrhi_p.h +++ b/src/gui/rhi/qrhi_p.h @@ -1379,6 +1379,11 @@ public: HDR10 }; + enum StereoTargetBuffer { + LeftBuffer, + RightBuffer + }; + QRhiResource::Type resourceType() const override; QWindow *window() const { return m_window; } @@ -1403,6 +1408,7 @@ public: virtual QRhiCommandBuffer *currentFrameCommandBuffer() = 0; virtual QRhiRenderTarget *currentFrameRenderTarget() = 0; + virtual QRhiRenderTarget *currentFrameRenderTarget(StereoTargetBuffer targetBuffer); virtual QSize surfacePixelSize() = 0; virtual bool isFormatSupported(Format f) = 0; virtual QRhiRenderPassDescriptor *newCompatibleRenderPassDescriptor() = 0; |