diff options
author | Laszlo Agocs <laszlo.agocs@qt.io> | 2019-06-17 12:17:19 +0200 |
---|---|---|
committer | Laszlo Agocs <laszlo.agocs@qt.io> | 2019-06-17 12:17:19 +0200 |
commit | 4c297bdca8da543c582d129f12413d29a2a520eb (patch) | |
tree | e2cdc1910d20a957fe7ac5e648d0c134008f8c36 /src/gui/rhi/qrhi_p_p.h | |
parent | 39d74b5b3db328fa32f7b831936d3671d29ff0e3 (diff) |
rhi: Make it possible to request making the context current on GL
Needed by Qt Quick to handle cases where the application (or other Qt)
code contains OpenGL calls, and Qt Quick facilitates this by ensuring
the scenegraph's GL context is current. The expectation is that when
running with the GL backend of the rhi, all such code remains fully
functional. So add a makeCurrent type of call into the QRhi API that is
a no-op with anything other than OpenGL.
Change-Id: I6f774bf828e31802bdab0c3fef9421cdc0cebe5c
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Diffstat (limited to 'src/gui/rhi/qrhi_p_p.h')
-rw-r--r-- | src/gui/rhi/qrhi_p_p.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/gui/rhi/qrhi_p_p.h b/src/gui/rhi/qrhi_p_p.h index 7c110431fb..de9bdae992 100644 --- a/src/gui/rhi/qrhi_p_p.h +++ b/src/gui/rhi/qrhi_p_p.h @@ -148,6 +148,7 @@ public: virtual int resourceLimit(QRhi::ResourceLimit limit) const = 0; virtual const QRhiNativeHandles *nativeHandles() = 0; virtual void sendVMemStatsToProfiler() = 0; + virtual void makeThreadLocalNativeContextCurrent() = 0; bool isCompressedFormat(QRhiTexture::Format format) const; void compressedFormatInfo(QRhiTexture::Format format, const QSize &size, |