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 c36cfe8
Showing 1 changed file with 9 additions and 8 deletions.
17 changes: 9 additions & 8 deletions plugins/quickinspector/quickinspector.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -301,15 +301,16 @@ 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::OpenGL:
break;
default:
return;
}

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

0 comments on commit c36cfe8

Please sign in to comment.