<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE html> <html lang="en"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <!-- qsgtexturematerial.cpp --> <title>QSGTextureMaterial Class | 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 ><a href="qtquick-module.html">C++ Classes</a></td><td >QSGTextureMaterial</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="#details">Detailed Description</a></li> </ul> </div> <div class="sidebar-content" id="sidebar-content"></div></div> <h1 class="title">QSGTextureMaterial Class</h1> <!-- $$$QSGTextureMaterial-brief --> <p>The <a href="qsgtexturematerial.html">QSGTextureMaterial</a> class provides a convenient way of rendering textured geometry in the scene graph. <a href="#details">More...</a></p> <!-- @@@QSGTextureMaterial --> <div class="table"><table class="alignedsummary"> <tr><td class="memItemLeft rightAlign topAlign"> Header:</td><td class="memItemRight bottomAlign"> <span class="preprocessor">#include <QSGTextureMaterial></span> </td></tr><tr><td class="memItemLeft rightAlign topAlign"> qmake:</td><td class="memItemRight bottomAlign"> QT += quick</td></tr><tr><td class="memItemLeft rightAlign topAlign"> Inherits:</td><td class="memItemRight bottomAlign"> <a href="qsgopaquetexturematerial.html">QSGOpaqueTextureMaterial</a></td></tr></table></div><ul> <li><a href="qsgtexturematerial-members.html">List of all members, including inherited members</a></li> </ul> <h3>Additional Inherited Members</h3> <ul> <li class="fn">12 public functions inherited from <a href="qsgopaquetexturematerial.html#public-functions">QSGOpaqueTextureMaterial</a></li> <li class="fn">5 public functions inherited from <a href="qsgmaterial.html#public-functions">QSGMaterial</a></li> </ul> <a name="details"></a> <!-- $$$QSGTextureMaterial-description --> <div class="descr"> <h2 id="details">Detailed Description</h2> <p>The <a href="qsgtexturematerial.html">QSGTextureMaterial</a> class provides a convenient way of rendering textured geometry in the scene graph.</p> <p><b>Warning:</b> This utility class is only functional when running with the OpenGL backend of the Qt Quick scenegraph.</p> <p>The textured material will fill every pixel in a geometry with the supplied texture.</p> <p>The geometry to be rendered with a texture material requires vertices in attribute location 0 and texture coordinates in attribute location 1. The texture coordinate is a 2-dimensional floating-point tuple. The <a href="qsggeometry.html#defaultAttributes_TexturedPoint2D">QSGGeometry::defaultAttributes_TexturedPoint2D</a> returns an attribute set compatible with this material.</p> <p>The texture to be rendered can be set using <a href="qsgopaquetexturematerial.html#setTexture">setTexture</a>(). How the texture should be rendered can be specified using <a href="qsgopaquetexturematerial.html#setMipmapFiltering">setMipmapFiltering</a>(), <a href="qsgopaquetexturematerial.html#setFiltering">setFiltering</a>(), <a href="qsgopaquetexturematerial.html#setHorizontalWrapMode">setHorizontalWrapMode</a>() and <a href="qsgopaquetexturematerial.html#setVerticalWrapMode">setVerticalWrapMode</a>(). The rendering state is set on the texture instance just before it is bound.</p> <p>The textured material respects the current matrix and the alpha channel of the texture. It will also respect the accumulated opacity in the scenegraph.</p> <p>A texture material must have a texture set before it is used as a material in the scene graph.</p> </div> <!-- @@@QSGTextureMaterial --> </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>