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/qrhinull.cpp | |
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/qrhinull.cpp')
-rw-r--r-- | src/gui/rhi/qrhinull.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/gui/rhi/qrhinull.cpp b/src/gui/rhi/qrhinull.cpp index ad7b74a5c3..c764669058 100644 --- a/src/gui/rhi/qrhinull.cpp +++ b/src/gui/rhi/qrhinull.cpp @@ -166,6 +166,11 @@ void QRhiNull::sendVMemStatsToProfiler() // nothing to do here } +void QRhiNull::makeThreadLocalNativeContextCurrent() +{ + // nothing to do here +} + QRhiRenderBuffer *QRhiNull::createRenderBuffer(QRhiRenderBuffer::Type type, const QSize &pixelSize, int sampleCount, QRhiRenderBuffer::Flags flags) { |