This file is indexed.

/usr/share/qt5/doc/qtquick/qsgmaterial.html is in qtdeclarative5-doc-html 5.5.1-2ubuntu6.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html>
<html lang="en">
<head>
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<!-- qsgmaterial.cpp -->
  <title>QSGMaterial Class | Qt Quick 5.5</title>
  <link rel="stylesheet" type="text/css" href="style/offline.css" />
</head>
<body>
<div class="header" id="qtdocheader">
    <div class="main">
    <div class="main-rounded">
        <div class="navigationbar">
        <ul>
<li>Qt 5.5</li>
<li><a href="qtquick-index.html">Qt Quick</a></li>
<li><a href="qtquick-module.html">C++ Classes</a></li>
<li>QSGMaterial</li>
<li id="buildversion">Qt 5.5.1 Reference Documentation</li>
    </ul>
    </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-types">Public Types</a></li>
<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">QSGMaterial Class</h1>
<!-- $$$QSGMaterial-brief -->
<p>The <a href="qsgmaterial.html">QSGMaterial</a> class encapsulates rendering state for a shader program. <a href="#details">More...</a></p>
<!-- @@@QSGMaterial -->
<div class="table"><table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> Header:</td><td class="memItemRight bottomAlign"> <span class="preprocessor">#include &lt;QSGMaterial&gt;</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"> Inherited By:</td><td class="memItemRight bottomAlign"> <p><a href="qsgflatcolormaterial.html">QSGFlatColorMaterial</a>, <a href="qsgopaquetexturematerial.html">QSGOpaqueTextureMaterial</a>, <a href="qsgsimplematerial.html">QSGSimpleMaterial</a>, and <a href="qsgvertexcolormaterial.html">QSGVertexColorMaterial</a></p>
</td></tr></table></div><ul>
<li><a href="qsgmaterial-members.html">List of all members, including inherited members</a></li>
</ul>
<a name="public-types"></a>
<h2 id="public-types">Public Types</h2>
<div class="table"><table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> enum </td><td class="memItemRight bottomAlign"><b><a href="qsgmaterial.html#Flag-enum">Flag</a></b> { Blending, RequiresDeterminant, RequiresFullMatrixExceptTranslate, RequiresFullMatrix, CustomCompileStep }</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> flags </td><td class="memItemRight bottomAlign"><b><a href="qsgmaterial.html#Flag-enum">Flags</a></b></td></tr>
</table></div>
<a name="public-functions"></a>
<h2 id="public-functions">Public Functions</h2>
<div class="table"><table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> virtual int </td><td class="memItemRight bottomAlign"><b><a href="qsgmaterial.html#compare">compare</a></b>(const QSGMaterial *<i> other</i>) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual QSGMaterialShader * </td><td class="memItemRight bottomAlign"><b><a href="qsgmaterial.html#createShader">createShader</a></b>() const = 0</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QSGMaterial::Flags </td><td class="memItemRight bottomAlign"><b><a href="qsgmaterial.html#flags">flags</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qsgmaterial.html#setFlag">setFlag</a></b>(Flags<i> flags</i>, bool<i> on</i> = true)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual QSGMaterialType * </td><td class="memItemRight bottomAlign"><b><a href="qsgmaterial.html#type">type</a></b>() const = 0</td></tr>
</table></div>
<a name="details"></a>
<!-- $$$QSGMaterial-description -->
<div class="descr">
<h2 id="details">Detailed Description</h2>
<p>The <a href="qsgmaterial.html">QSGMaterial</a> class encapsulates rendering state for a shader program.</p>
<p>The <a href="qsgmaterial.html">QSGMaterial</a> API is very low-level. A more convenient API, which provides almost all the same features, is available through <a href="qsgsimplematerialshader.html">QSGSimpleMaterialShader</a>.</p>
<p>The <a href="qsgmaterial.html">QSGMaterial</a> and <a href="qsgmaterialshader.html">QSGMaterialShader</a> subclasses form a tight relationship. For one scene graph (including nested graphs), there is one unique <a href="qsgmaterialshader.html">QSGMaterialShader</a> instance which encapsulates the QOpenGLShaderProgram the scene graph uses to render that material, such as a shader to flat coloring of geometry. Each <a href="qsggeometrynode.html">QSGGeometryNode</a> can have a unique <a href="qsgmaterial.html">QSGMaterial</a> containing the how the shader should be configured when drawing that node, such as the actual color to used to render the geometry.</p>
<p>The <a href="qsgmaterial.html">QSGMaterial</a> has two virtual functions that both need to be implemented. The function <a href="qsgmaterial.html#type">type</a>() should return a unique instance for all instances of a specific subclass. The <a href="qsgmaterial.html#createShader">createShader</a>() function should return a new instance of <a href="qsgmaterialshader.html">QSGMaterialShader</a>, specific to the subclass of <a href="qsgmaterial.html">QSGMaterial</a>.</p>
<p>A minimal <a href="qsgmaterial.html">QSGMaterial</a> implementation could look like this:</p>
<pre class="cpp"><span class="keyword">class</span> Material : <span class="keyword">public</span> <span class="type">QSGMaterial</span>
{
<span class="keyword">public</span>:
    <span class="type"><a href="qsgmaterialtype.html">QSGMaterialType</a></span> <span class="operator">*</span>type() <span class="keyword">const</span> { <span class="keyword">static</span> <span class="type"><a href="qsgmaterialtype.html">QSGMaterialType</a></span> type; <span class="keyword">return</span> <span class="operator">&amp;</span>type; }
    <span class="type"><a href="qsgmaterialshader.html">QSGMaterialShader</a></span> <span class="operator">*</span>createShader() <span class="keyword">const</span> { <span class="keyword">return</span> <span class="keyword">new</span> Shader; }
};</pre>
<p><b>Note: </b>All classes with QSG prefix should be used solely on the scene graph's rendering thread. See <a href="qtquick-visualcanvas-scenegraph.html#scene-graph-and-rendering">Scene Graph and Rendering</a> for more information.</p></div>
<!-- @@@QSGMaterial -->
<div class="types">
<h2>Member Type Documentation</h2>
<!-- $$$Flag$$$Blending$$$RequiresDeterminant$$$RequiresFullMatrixExceptTranslate$$$RequiresFullMatrix$$$CustomCompileStep -->
<h3 class="flags" id="Flag-enum"><a name="Flag-enum"></a>enum QSGMaterial::<span class="name">Flag</span><br/>flags QSGMaterial::<span class="name">Flags</span></h3>
<div class="table"><table class="valuelist"><tr valign="top" class="odd"><th class="tblConst">Constant</th><th class="tblval">Value</th><th class="tbldscr">Description</th></tr>
<tr><td class="topAlign"><code>QSGMaterial::Blending</code></td><td class="topAlign"><code>0x0001</code></td><td class="topAlign">Set this flag to true if the material requires GL_BLEND to be enabled during rendering.</td></tr>
<tr><td class="topAlign"><code>QSGMaterial::RequiresDeterminant</code></td><td class="topAlign"><code>0x0002</code></td><td class="topAlign">Set this flag to true if the material relies on the determinant of the matrix of the geometry nodes for rendering.</td></tr>
<tr><td class="topAlign"><code>QSGMaterial::RequiresFullMatrixExceptTranslate</code></td><td class="topAlign"><code>0x0004 | RequiresDeterminant</code></td><td class="topAlign">Set this flag to true if the material relies on the full matrix of the geometry nodes for rendering, except the translation part.</td></tr>
<tr><td class="topAlign"><code>QSGMaterial::RequiresFullMatrix</code></td><td class="topAlign"><code>0x0008 | RequiresFullMatrixExceptTranslate</code></td><td class="topAlign">Set this flag to true if the material relies on the full matrix of the geometry nodes for rendering.</td></tr>
<tr><td class="topAlign"><code>QSGMaterial::CustomCompileStep</code></td><td class="topAlign"><code>0x0010</code></td><td class="topAlign">Starting with Qt 5.2, the scene graph will not always call</td></tr>
</table></div>
<p><a href="qsgmaterialshader.html#compile">QSGMaterialShader::compile</a>() when its shader program is compiled and linked. Set this flag to enforce that the function is called.</p>
<p>The Flags type is a typedef for <a href="">QFlags</a>&lt;Flag&gt;. It stores an OR combination of Flag values.</p>
<!-- @@@Flag -->
</div>
<div class="func">
<h2>Member Function Documentation</h2>
<!-- $$$compare[overload1]$$$compareconstQSGMaterial* -->
<h3 class="fn" id="compare"><a name="compare"></a><code>[virtual] </code><span class="type">int</span> QSGMaterial::<span class="name">compare</span>(const <span class="type">QSGMaterial</span> *<i> other</i>) const</h3>
<p>Compares this material to <i>other</i> and returns 0 if they are equal; -1 if this material should sort before <i>other</i> and 1 if <i>other</i> should sort before.</p>
<p>The scene graph can reorder geometry nodes to minimize state changes. The compare function is called during the sorting process so that the materials can be sorted to minimize state changes in each call to <a href="qsgmaterialshader.html#updateState">QSGMaterialShader::updateState</a>().</p>
<p>The this pointer and <i>other</i> is guaranteed to have the same <a href="qsgmaterial.html#type">type</a>().</p>
<!-- @@@compare -->
<!-- $$$createShader[overload1]$$$createShader -->
<h3 class="fn" id="createShader"><a name="createShader"></a><code>[pure virtual] </code><span class="type"><a href="qsgmaterialshader.html">QSGMaterialShader</a></span> * QSGMaterial::<span class="name">createShader</span>() const</h3>
<p>This function returns a new instance of a the <a href="qsgmaterialshader.html">QSGMaterialShader</a> implementatation used to render geometry for a specific implementation of <a href="qsgmaterial.html">QSGMaterial</a>.</p>
<p>The function will be called only once for each material type that exists in the scene graph and will be cached internally.</p>
<!-- @@@createShader -->
<!-- $$$flags[overload1]$$$flags -->
<h3 class="fn" id="flags"><a name="flags"></a><span class="type"><a href="qsgmaterial.html#Flag-enum">QSGMaterial::Flags</a></span> QSGMaterial::<span class="name">flags</span>() const</h3>
<p>Returns the material's flags.</p>
<!-- @@@flags -->
<!-- $$$setFlag[overload1]$$$setFlagFlagsbool -->
<h3 class="fn" id="setFlag"><a name="setFlag"></a><span class="type">void</span> QSGMaterial::<span class="name">setFlag</span>(<span class="type"><a href="qsgmaterial.html#Flag-enum">Flags</a></span><i> flags</i>, <span class="type">bool</span><i> on</i> = true)</h3>
<p>Sets the flags <i>flags</i> on this material if <i>on</i> is true; otherwise clears the attribute.</p>
<!-- @@@setFlag -->
<!-- $$$type[overload1]$$$type -->
<h3 class="fn" id="type"><a name="type"></a><code>[pure virtual] </code><span class="type"><a href="qsgmaterialtype.html">QSGMaterialType</a></span> * QSGMaterial::<span class="name">type</span>() const</h3>
<p>This function is called by the scene graph to return a unique instance per subclass.</p>
<!-- @@@type -->
</div>
        </div>
       </div>
   </div>
   </div>
</div>
<div class="footer">
   <p>
   <acronym title="Copyright">&copy;</acronym> 2015 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>