<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE html> <html lang="en"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <!-- canvasglstatedump.cpp --> <title>GLStateDumpExt QML Type | Qt Canvas 3D 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="qtcanvas3d-index.html">Qt Canvas 3D</a></td><td ><a href="qtcanvas3d-qmlmodule.html">QML Types</a></td><td >GLStateDumpExt QML Type</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="#methods">Methods</a></li> <li class="level1"><a href="#details">Detailed Description</a></li> </ul> </div> <div class="sidebar-content" id="sidebar-content"></div></div> <h1 class="title">GLStateDumpExt QML Type</h1> <span class="subtitle"></span> <!-- $$$GLStateDumpExt-brief --> <p>Provides means to print current GL driver state info. <a href="#details">More...</a></p> <!-- @@@GLStateDumpExt --> <div class="table"><table class="alignedsummary"> <tr><td class="memItemLeft rightAlign topAlign"> Import Statement:</td><td class="memItemRight bottomAlign"> import QtCanvas3D 1.1</td></tr><tr><td class="memItemLeft rightAlign topAlign"> Since:</td><td class="memItemRight bottomAlign"> QtCanvas3D 1.0</td></tr></table></div><ul> <li><a href="qml-qtcanvas3d-glstatedumpext-members.html">List of all members, including inherited members</a></li> </ul> <a name="methods"></a> <h2 id="methods">Methods</h2> <ul> <li class="fn">string <b><b><a href="qml-qtcanvas3d-glstatedumpext.html#getGLStateDump-method">getGLStateDump</a></b></b>(stateDumpEnums <i>options</i>)</li> </ul> <!-- $$$GLStateDumpExt-description --> <a name="details"></a> <h2 id="details">Detailed Description</h2> <p>An uncreatable QML type that provides an extension API that can be used to dump current OpenGL driver state as a string that can be then, for example, be printed on the console log. You can get it by calling <a href="qml-qtcanvas3d-context3d.html#getExtension-method">Context3D.getExtension</a> with <code>"QTCANVAS3D_gl_state_dump"</code> as parameter.</p> <p>Typical usage could be something like this:</p> <pre class="cpp"> <span class="comment">// Declare the variable to contain the extension</span> var stateDumpExt; <span class="operator">.</span> <span class="operator">.</span> <span class="comment">// After the context has been created from Canvas3D get the extension</span> stateDumpExt <span class="operator">=</span> gl<span class="operator">.</span>getExtension(<span class="string">"QTCANVAS3D_gl_state_dump"</span>); <span class="operator">.</span> <span class="operator">.</span> <span class="comment">// When you want to print the current GL state with everything enabled</span> <span class="comment">// Check that you indeed have a valid extension (for portability) then use it</span> <span class="keyword">if</span> (stateDumpExt) log(<span class="string">"GL STATE DUMP:\n"</span><span class="operator">+</span>stateDumpExt<span class="operator">.</span>getGLStateDump(stateDumpExt<span class="operator">.</span>DUMP_FULL)); </pre> <p><b>See also </b><a href="qml-qtcanvas3d-context3d.html">Context3D</a>.</p> <!-- @@@GLStateDumpExt --> <h2>Method Documentation</h2> <!-- $$$getGLStateDump --> <div class="qmlitem"><div class="qmlproto"> <div class="table"><table class="qmlname"> <tr valign="top" class="odd" id="getGLStateDump-method"> <td class="tblQmlFuncNode"><p> <a name="getGLStateDump-method"></a><span class="type">string</span> <span class="name">getGLStateDump</span>(<span class="type">stateDumpEnums</span> <i>options</i>)</p></td></tr> </table></div> </div><div class="qmldoc"><p>Returns OpenGL driver state with given options as a human readable string that can be printed. Optional paremeter <i>options</i> may contain bitfields masked together from following options:</p> <ul> <li><code>GLStateDumpExt.DUMP_BASIC_ONLY</code> Includes only very basic OpenGL state information.</li> <li><code>GLStateDumpExt.DUMP_VERTEX_ATTRIB_ARRAYS_BIT</code> Includes all vertex attribute array information.</li> <li><code>GLStateDumpExt.DUMP_VERTEX_ATTRIB_ARRAYS_BUFFERS_BIT</code> Includes size and type from all currently active vertex attribute arrays (including the currently bound element array) to verify that there are actual values in the array.</li> <li><code>GLStateDumpExt.DUMP_FULL</code> Includes everything.</li> </ul> <p>This command is handled synchronously.</p> </div></div><!-- @@@getGLStateDump --> <br/> </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>