<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE html> <html lang="en"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <!-- adaptations.qdoc --> <title>Scene Graph Adaptations | Qt Quick 5.9</title> <link rel="stylesheet" type="text/css" href="style/offline-simple.css" /> <script type="text/javascript"> document.getElementsByTagName("link").item(0).setAttribute("href", "style/offline.css"); // loading style sheet breaks anchors that were jumped to before // so force jumping to anchor again setTimeout(function() { var anchor = location.hash; // need to jump to different anchor first (e.g. none) location.hash = "#"; setTimeout(function() { location.hash = anchor; }, 0); }, 0); </script> </head> <body> <div class="header" id="qtdocheader"> <div class="main"> <div class="main-rounded"> <div class="navigationbar"> <table><tr> <td >Qt 5.9</td><td ><a href="qtquick-index.html">Qt Quick</a></td><td >Scene Graph Adaptations</td></tr></table><table class="buildversion"><tr> <td id="buildversion" width="100%" align="right">Qt 5.9.4 Reference Documentation</td> </tr></table> </div> </div> <div class="content"> <div class="line"> <div class="content mainContent"> <div class="sidebar"> <div class="toc"> <h3><a name="toc">Contents</a></h3> <ul> <li class="level1"><a href="#scene-graph-adaptations-in-qt-quick">Scene Graph Adaptations in Qt Quick</a></li> <li class="level1"><a href="#switching-between-the-adaptation-used-by-the-application">Switching Between the Adaptation Used by the Application</a></li> <li class="level1"><a href="#opengl-es-2-0-and-opengl-2-0-adaptation">OpenGL ES 2.0 and OpenGL 2.0 Adaptation</a></li> <li class="level1"><a href="#software-adaptation">Software Adaptation</a></li> <li class="level1"><a href="#direct3d-12-experimental">Direct3D 12 (experimental)</a></li> <li class="level1"><a href="#openvg">OpenVG</a></li> </ul> </div> <div class="sidebar-content" id="sidebar-content"></div></div> <h1 class="title">Scene Graph Adaptations</h1> <span class="subtitle"></span> <!-- $$$qtquick-visualcanvas-adaptations.html-description --> <div class="descr"> <a name="details"></a> <a name="scene-graph-adaptations-in-qt-quick"></a> <h2 id="scene-graph-adaptations-in-qt-quick">Scene Graph Adaptations in Qt Quick</h2> <p>Originally Qt Quick always relied on OpenGL (OpenGL ES 2.0 or OpenGL 2.0) for parsing the scene graph and rendering the results to a render target. From Qt 5.8 onwards Qt Quick also supports rendering in software and with Direct3D 12.</p> <a name="switching-between-the-adaptation-used-by-the-application"></a> <h2 id="switching-between-the-adaptation-used-by-the-application">Switching Between the Adaptation Used by the Application</h2> <p>The default rendering backend is still OpenGL, or - in Qt builds with disabled OpenGL support - the software renderer. This can be overridden either by using an environment variable or a C++ API. The former consists of setting the <code>QT_QUICK_BACKEND</code> or the legacy <code>QMLSCENE_DEVICE</code> environment variable before launching applications. The latter is done by calling <a href="qquickwindow.html#setSceneGraphBackend">QQuickWindow::setSceneGraphBackend</a>() early in the application's main() function.</p> <p>The supported backends are the following</p> <ul> <li>OpenGL - Requested by the string <code>""</code> or the enum value <a href="qsgrendererinterface.html#GraphicsApi-enum">QSGRendererInterface::OpenGL</a>.</li> <li>Software - Requested by the string <code>"software"</code> or the enum value <a href="qsgrendererinterface.html#GraphicsApi-enum">QSGRendererInterface::Software</a>.</li> <li>Direct3D 12 - Requested by the string <code>"d3d12"</code> or the enum value <a href="qsgrendererinterface.html#GraphicsApi-enum">QSGRendererInterface::Direct3D12</a>.</li> <li><a href="qtquick-visualcanvas-adaptations.html#openvg">OpenVG</a> - Requested by the string <code>"openvg"</code> or the enum value <a href="qsgrendererinterface.html#GraphicsApi-enum">QSGRendererInterface::OpenVG</a>.</li> </ul> <p>When in doubt which backend is in use, enable basic scenegraph information logging via the <code>QSG_INFO</code> environment variable or the <code>qt.scenegraph.general</code> logging category. This will result in printing some information during application startup onto the debug output.</p> <p><b>Note: </b>Adaptations other than OpenGL will typically come with a set of limitations since they are unlikely to provide a feature set 100% compatible with OpenGL. However, they may provide their own specific advantages in certain areas. Refer to the sections below for more information on the various adaptations.</p><a name="opengl-es-2-0-and-opengl-2-0-adaptation"></a> <h2 id="opengl-es-2-0-and-opengl-2-0-adaptation">OpenGL ES 2.0 and OpenGL 2.0 Adaptation</h2> <p>The default adaptation capable of providing the full Qt Quick 2 feature set is the OpenGL adaptation. All of the details of the OpenGL adaptation can are available here: <a href="qtquick-visualcanvas-scenegraph-renderer.html">OpenGL Adaptation</a></p> <a name="software-adaptation"></a> <h2 id="software-adaptation">Software Adaptation</h2> <p>The Software adaptation is an alternative renderer for <a href="qtquick-index.html">Qt Quick</a> 2 that uses the raster paint engine to render the contents of the scene graph. The details for this adaptation are available here: <a href="qtquick-visualcanvas-adaptations-software.html">Software Adaptation</a></p> <a name="direct3d-12-experimental"></a> <h2 id="direct3d-12-experimental">Direct3D 12 (experimental)</h2> <p>The Direct3D 12 adaptation is an alternative renderer for <a href="qtquick-index.html">Qt Quick</a> 2 when running on Windows 10, both for Win32 and UWP applications. The details for this adaptation are available here: <a href="qtquick-visualcanvas-adaptations-d3d12.html">Direct3D 12 Adaptation</a></p> <a name="openvg"></a> <h2 id="openvg">OpenVG</h2> <p>The <a href="qtquick-visualcanvas-adaptations.html#openvg">OpenVG</a> adaptation is an alternative renderer for <a href="qtquick-index.html">Qt Quick</a> 2 that will renderer the contents of the scene graph using <a href="qtquick-visualcanvas-adaptations.html#openvg">OpenVG</a> commands to provide hardware-acclerated 2D vector and raster graphics. The details for this adaptation are available here: <a href="qtquick-visualcanvas-adaptations-openvg.html">OpenVG Adaptation</a></p> </div> <!-- @@@qtquick-visualcanvas-adaptations.html --> </div> </div> </div> </div> </div> <div class="footer"> <p> <acronym title="Copyright">©</acronym> 2017 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners.<br> The documentation provided herein is licensed under the terms of the <a href="http://www.gnu.org/licenses/fdl.html">GNU Free Documentation License version 1.3</a> as published by the Free Software Foundation.<br> Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners. </p> </div> </body> </html>