Skip to content

Commit

Permalink
Re-add ability to switch render modes under Qt 6
Browse files Browse the repository at this point in the history
Fixes #880, where QSG_VISUALIZE overdraw, and other modes, were
not working under Plasma.  Note, other render modes, such as
Vulkan, are yet to be implemented.
  • Loading branch information
Cuperino committed Mar 21, 2024
1 parent 0d81c33 commit 034dc17
Showing 1 changed file with 10 additions and 8 deletions.
18 changes: 10 additions & 8 deletions plugins/quickinspector/quickinspector.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -301,15 +301,17 @@ void RenderModeRequest::apply()
if (connection)
disconnect(connection);

#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
// crashes in qrhigles2..bindShaderResources sometimes
return;
#endif

if (window && window->rendererInterface()->graphicsApi() != QSGRendererInterface::OpenGL)
return;

if (window) {
switch(window->rendererInterface()->graphicsApi()) {
// Compatible render interfaces
case QSGRendererInterface::Software:
case QSGRendererInterface::OpenVG:
case QSGRendererInterface::OpenGL:
break;
default:
return;
}

emit aboutToCleanSceneGraph();
const QByteArray mode = renderModeToString(RenderModeRequest::mode);
QQuickWindowPrivate *winPriv = QQuickWindowPrivate::get(window);
Expand Down

0 comments on commit 034dc17

Please sign in to comment.