From 4c297bdca8da543c582d129f12413d29a2a520eb Mon Sep 17 00:00:00 2001 From: Laszlo Agocs Date: Mon, 17 Jun 2019 12:17:19 +0200 Subject: 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 --- src/gui/rhi/qrhinull.cpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/gui/rhi/qrhinull.cpp') 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) { -- cgit v1.2.3