<?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>QSGOpaqueTextureMaterial 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 >QSGOpaqueTextureMaterial</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="#public-functions">Public Functions</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">QSGOpaqueTextureMaterial Class</h1> <!-- $$$QSGOpaqueTextureMaterial-brief --> <p>The <a href="qsgopaquetexturematerial.html">QSGOpaqueTextureMaterial</a> class provides a convenient way of rendering textured geometry in the scene graph. <a href="#details">More...</a></p> <!-- @@@QSGOpaqueTextureMaterial --> <div class="table"><table class="alignedsummary"> <tr><td class="memItemLeft rightAlign topAlign"> Header:</td><td class="memItemRight bottomAlign"> <span class="preprocessor">#include <QSGOpaqueTextureMaterial></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="qsgmaterial.html">QSGMaterial</a></td></tr><tr><td class="memItemLeft rightAlign topAlign"> Inherited By:</td><td class="memItemRight bottomAlign"> <p><a href="qsgtexturematerial.html">QSGTextureMaterial</a></p> </td></tr></table></div><ul> <li><a href="qsgopaquetexturematerial-members.html">List of all members, including inherited members</a></li> </ul> <a name="public-functions"></a> <h2 id="public-functions">Public Functions</h2> <div class="table"><table class="alignedsummary"> <tr><td class="memItemLeft rightAlign topAlign"> </td><td class="memItemRight bottomAlign"><b><a href="qsgopaquetexturematerial.html#QSGOpaqueTextureMaterial">QSGOpaqueTextureMaterial</a></b>()</td></tr> <tr><td class="memItemLeft rightAlign topAlign"> QSGTexture::AnisotropyLevel </td><td class="memItemRight bottomAlign"><b><a href="qsgopaquetexturematerial.html#anisotropyLevel">anisotropyLevel</a></b>() const</td></tr> <tr><td class="memItemLeft rightAlign topAlign"> QSGTexture::Filtering </td><td class="memItemRight bottomAlign"><b><a href="qsgopaquetexturematerial.html#filtering">filtering</a></b>() const</td></tr> <tr><td class="memItemLeft rightAlign topAlign"> QSGTexture::WrapMode </td><td class="memItemRight bottomAlign"><b><a href="qsgopaquetexturematerial.html#horizontalWrapMode">horizontalWrapMode</a></b>() const</td></tr> <tr><td class="memItemLeft rightAlign topAlign"> QSGTexture::Filtering </td><td class="memItemRight bottomAlign"><b><a href="qsgopaquetexturematerial.html#mipmapFiltering">mipmapFiltering</a></b>() const</td></tr> <tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qsgopaquetexturematerial.html#setAnisotropyLevel">setAnisotropyLevel</a></b>(QSGTexture::AnisotropyLevel <i>level</i>)</td></tr> <tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qsgopaquetexturematerial.html#setFiltering">setFiltering</a></b>(QSGTexture::Filtering <i>filtering</i>)</td></tr> <tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qsgopaquetexturematerial.html#setHorizontalWrapMode">setHorizontalWrapMode</a></b>(QSGTexture::WrapMode <i>mode</i>)</td></tr> <tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qsgopaquetexturematerial.html#setMipmapFiltering">setMipmapFiltering</a></b>(QSGTexture::Filtering <i>filtering</i>)</td></tr> <tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qsgopaquetexturematerial.html#setTexture">setTexture</a></b>(QSGTexture *<i>texture</i>)</td></tr> <tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qsgopaquetexturematerial.html#setVerticalWrapMode">setVerticalWrapMode</a></b>(QSGTexture::WrapMode <i>mode</i>)</td></tr> <tr><td class="memItemLeft rightAlign topAlign"> QSGTexture *</td><td class="memItemRight bottomAlign"><b><a href="qsgopaquetexturematerial.html#texture">texture</a></b>() const</td></tr> <tr><td class="memItemLeft rightAlign topAlign"> QSGTexture::WrapMode </td><td class="memItemRight bottomAlign"><b><a href="qsgopaquetexturematerial.html#verticalWrapMode">verticalWrapMode</a></b>() const</td></tr> </table></div> <ul> <li class="fn">5 public functions inherited from <a href="qsgmaterial.html#public-functions">QSGMaterial</a></li> </ul> <a name="details"></a> <!-- $$$QSGOpaqueTextureMaterial-description --> <div class="descr"> <h2 id="details">Detailed Description</h2> <p>The <a href="qsgopaquetexturematerial.html">QSGOpaqueTextureMaterial</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 opaque textured material will fill every pixel in a geometry with the supplied texture. The material does not respect the opacity of the <a href="qsgmaterialshader-renderstate.html">QSGMaterialShader::RenderState</a>, so opacity nodes in the parent chain of nodes using this material, have no effect.</p> <p>The geometry to be rendered with an opaque 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 opaque textured material respects the current matrix and the alpha channel of the texture. It will disregard 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> <!-- @@@QSGOpaqueTextureMaterial --> <div class="func"> <h2>Member Function Documentation</h2> <!-- $$$QSGOpaqueTextureMaterial[overload1]$$$QSGOpaqueTextureMaterial --> <h3 class="fn" id="QSGOpaqueTextureMaterial"><a name="QSGOpaqueTextureMaterial"></a>QSGOpaqueTextureMaterial::<span class="name">QSGOpaqueTextureMaterial</span>()</h3> <p>Creates a new <a href="qsgopaquetexturematerial.html">QSGOpaqueTextureMaterial</a>.</p> <p>The default mipmap filtering and filtering mode is set to <a href="qsgtexture.html#Filtering-enum">QSGTexture::Nearest</a>. The default wrap modes is set to <code>QSGTexture::ClampToEdge</code>.</p> <!-- @@@QSGOpaqueTextureMaterial --> <!-- $$$anisotropyLevel[overload1]$$$anisotropyLevel --> <h3 class="fn" id="anisotropyLevel"><a name="anisotropyLevel"></a><span class="type"><a href="qsgtexture.html#AnisotropyLevel-enum">QSGTexture::AnisotropyLevel</a></span> QSGOpaqueTextureMaterial::<span class="name">anisotropyLevel</span>() const</h3> <p><b>See also </b><a href="qsgopaquetexturematerial.html#setAnisotropyLevel">setAnisotropyLevel</a>().</p> <!-- @@@anisotropyLevel --> <!-- $$$filtering[overload1]$$$filtering --> <h3 class="fn" id="filtering"><a name="filtering"></a><span class="type"><a href="qsgtexture.html#Filtering-enum">QSGTexture::Filtering</a></span> QSGOpaqueTextureMaterial::<span class="name">filtering</span>() const</h3> <p>Returns this material's filtering mode.</p> <p>The default filtering is <code>QSGTexture::Nearest</code>.</p> <p><b>See also </b><a href="qsgopaquetexturematerial.html#setFiltering">setFiltering</a>().</p> <!-- @@@filtering --> <!-- $$$horizontalWrapMode[overload1]$$$horizontalWrapMode --> <h3 class="fn" id="horizontalWrapMode"><a name="horizontalWrapMode"></a><span class="type"><a href="qsgtexture.html#WrapMode-enum">QSGTexture::WrapMode</a></span> QSGOpaqueTextureMaterial::<span class="name">horizontalWrapMode</span>() const</h3> <p>Returns this material's horizontal wrap mode.</p> <p>The default horizontal wrap mode is <code>QSGTexutre::ClampToEdge</code>.</p> <p><b>See also </b><a href="qsgopaquetexturematerial.html#setHorizontalWrapMode">setHorizontalWrapMode</a>().</p> <!-- @@@horizontalWrapMode --> <!-- $$$mipmapFiltering[overload1]$$$mipmapFiltering --> <h3 class="fn" id="mipmapFiltering"><a name="mipmapFiltering"></a><span class="type"><a href="qsgtexture.html#Filtering-enum">QSGTexture::Filtering</a></span> QSGOpaqueTextureMaterial::<span class="name">mipmapFiltering</span>() const</h3> <p>Returns this material's mipmap filtering mode.</p> <p>The default mipmap mode is <code>QSGTexture::Nearest</code>.</p> <p><b>See also </b><a href="qsgopaquetexturematerial.html#setMipmapFiltering">setMipmapFiltering</a>().</p> <!-- @@@mipmapFiltering --> <!-- $$$setAnisotropyLevel[overload1]$$$setAnisotropyLevelQSGTexture::AnisotropyLevel --> <h3 class="fn" id="setAnisotropyLevel"><a name="setAnisotropyLevel"></a><span class="type">void</span> QSGOpaqueTextureMaterial::<span class="name">setAnisotropyLevel</span>(<span class="type"><a href="qsgtexture.html#AnisotropyLevel-enum">QSGTexture::AnisotropyLevel</a></span> <i>level</i>)</h3> <p><b>See also </b><a href="qsgopaquetexturematerial.html#anisotropyLevel">anisotropyLevel</a>().</p> <!-- @@@setAnisotropyLevel --> <!-- $$$setFiltering[overload1]$$$setFilteringQSGTexture::Filtering --> <h3 class="fn" id="setFiltering"><a name="setFiltering"></a><span class="type">void</span> QSGOpaqueTextureMaterial::<span class="name">setFiltering</span>(<span class="type"><a href="qsgtexture.html#Filtering-enum">QSGTexture::Filtering</a></span> <i>filtering</i>)</h3> <p>Sets the filtering to <i>filtering</i>.</p> <p>The filtering mode is set on the texture instance just before the texture is bound for rendering.</p> <p><b>See also </b><a href="qsgopaquetexturematerial.html#filtering">filtering</a>().</p> <!-- @@@setFiltering --> <!-- $$$setHorizontalWrapMode[overload1]$$$setHorizontalWrapModeQSGTexture::WrapMode --> <h3 class="fn" id="setHorizontalWrapMode"><a name="setHorizontalWrapMode"></a><span class="type">void</span> QSGOpaqueTextureMaterial::<span class="name">setHorizontalWrapMode</span>(<span class="type"><a href="qsgtexture.html#WrapMode-enum">QSGTexture::WrapMode</a></span> <i>mode</i>)</h3> <p>Sets the horizontal wrap mode to <i>mode</i>.</p> <p>The horizontal wrap mode is set on the texture instance just before the texture is bound for rendering.</p> <p><b>See also </b><a href="qsgopaquetexturematerial.html#horizontalWrapMode">horizontalWrapMode</a>().</p> <!-- @@@setHorizontalWrapMode --> <!-- $$$setMipmapFiltering[overload1]$$$setMipmapFilteringQSGTexture::Filtering --> <h3 class="fn" id="setMipmapFiltering"><a name="setMipmapFiltering"></a><span class="type">void</span> QSGOpaqueTextureMaterial::<span class="name">setMipmapFiltering</span>(<span class="type"><a href="qsgtexture.html#Filtering-enum">QSGTexture::Filtering</a></span> <i>filtering</i>)</h3> <p>Sets the mipmap mode to <i>filtering</i>.</p> <p>The mipmap filtering mode is set on the texture instance just before the texture is bound for rendering.</p> <p>If the texture does not have mipmapping support, enabling mipmapping has no effect.</p> <p><b>See also </b><a href="qsgopaquetexturematerial.html#mipmapFiltering">mipmapFiltering</a>().</p> <!-- @@@setMipmapFiltering --> <!-- $$$setTexture[overload1]$$$setTextureQSGTexture* --> <h3 class="fn" id="setTexture"><a name="setTexture"></a><span class="type">void</span> QSGOpaqueTextureMaterial::<span class="name">setTexture</span>(<span class="type"><a href="qsgtexture.html">QSGTexture</a></span> *<i>texture</i>)</h3> <p>Sets the texture of this material to <i>texture</i>.</p> <p>The material does not take ownership of the texture.</p> <p><b>See also </b><a href="qsgopaquetexturematerial.html#texture">texture</a>().</p> <!-- @@@setTexture --> <!-- $$$setVerticalWrapMode[overload1]$$$setVerticalWrapModeQSGTexture::WrapMode --> <h3 class="fn" id="setVerticalWrapMode"><a name="setVerticalWrapMode"></a><span class="type">void</span> QSGOpaqueTextureMaterial::<span class="name">setVerticalWrapMode</span>(<span class="type"><a href="qsgtexture.html#WrapMode-enum">QSGTexture::WrapMode</a></span> <i>mode</i>)</h3> <p>Sets the vertical wrap mode to <i>mode</i>.</p> <p>The vertical wrap mode is set on the texture instance just before the texture is bound for rendering.</p> <p><b>See also </b><a href="qsgopaquetexturematerial.html#verticalWrapMode">verticalWrapMode</a>().</p> <!-- @@@setVerticalWrapMode --> <!-- $$$texture[overload1]$$$texture --> <h3 class="fn" id="texture"><a name="texture"></a><span class="type"><a href="qsgtexture.html">QSGTexture</a></span> *QSGOpaqueTextureMaterial::<span class="name">texture</span>() const</h3> <p>Returns this texture material's texture.</p> <p><b>See also </b><a href="qsgopaquetexturematerial.html#setTexture">setTexture</a>().</p> <!-- @@@texture --> <!-- $$$verticalWrapMode[overload1]$$$verticalWrapMode --> <h3 class="fn" id="verticalWrapMode"><a name="verticalWrapMode"></a><span class="type"><a href="qsgtexture.html#WrapMode-enum">QSGTexture::WrapMode</a></span> QSGOpaqueTextureMaterial::<span class="name">verticalWrapMode</span>() const</h3> <p>Returns this material's vertical wrap mode.</p> <p>The default vertical wrap mode is <code>QSGTexutre::ClampToEdge</code>.</p> <p><b>See also </b><a href="qsgopaquetexturematerial.html#setVerticalWrapMode">setVerticalWrapMode</a>().</p> <!-- @@@verticalWrapMode --> </div> </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>