This file is indexed.

/usr/share/qt5/doc/qtquick/qsgmaterial.html is in qtdeclarative5-doc-html 5.2.1-3ubuntu15.

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 PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en_US" lang="en_US">
<head>
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<!-- qsgmaterial.cpp -->
  <title>QSGMaterial Class | QtQuick 5.2</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.2</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.2.1 Reference Documentation</li>
    </ul>
    </div>
</div>
<div class="content">
<div class="line">
<div class="content mainContent">
<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>
<h1 class="title">QSGMaterial Class</h1>
<!-- $$$QSGMaterial-brief -->
<p>The QSGMaterial class encapsulates rendering state for a shader program. <a href="#details">More...</a></p>
<!-- @@@QSGMaterial -->
<table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> Header:</td><td class="memItemRight bottomAlign"> </b><tt><span class="preprocessor">#include &lt;QSGMaterial&gt;</span>
</tt></td></tr><tr><td class="memItemLeft rightAlign topAlign"> qmake:</td><td class="memItemRight bottomAlign"> <tt>QT += quick</tt></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><ul>
<li><a href="qsgmaterial-members.html">List of all members, including inherited members</a></li>
</ul>
<a name="public-types"></a>
<h2>Public Types</h2>
<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>
<a name="public-functions"></a>
<h2>Public Functions</h2>
<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>
<a name="details"></a>
<!-- $$$QSGMaterial-description -->
<div class="descr">
<h2>Detailed Description</h2>
<p>The QSGMaterial class encapsulates rendering state for a shader program.</p>
<p>The QSGMaterial 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 QSGMaterial 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 QSGMaterial 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 QSGMaterial 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 QSGMaterial.</p>
<p>A minimal QSGMaterial 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>Warning:</b> Instances of QSGMaterial belongs to the Scene Graph rendering thread, and cannot be used from the GUI thread.</p>
</div>
<!-- @@@QSGMaterial -->
<div class="types">
<h2>Member Type Documentation</h2>
<!-- $$$Flag$$$Blending$$$RequiresDeterminant$$$RequiresFullMatrixExceptTranslate$$$RequiresFullMatrix$$$CustomCompileStep -->
<h3 class="flags"><a name="Flag-enum"></a>enum QSGMaterial::<span class="name">Flag</span><br/>flags QSGMaterial::<span class="name">Flags</span></h3>
<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"><tt>QSGMaterial::Blending</tt></td><td class="topAlign"><tt>0x0001</tt></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"><tt>QSGMaterial::RequiresDeterminant</tt></td><td class="topAlign"><tt>0x0002</tt></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"><tt>QSGMaterial::RequiresFullMatrixExceptTranslate</tt></td><td class="topAlign"><tt>0x0004 | RequiresDeterminant</tt></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"><tt>QSGMaterial::RequiresFullMatrix</tt></td><td class="topAlign"><tt>0x0008 | RequiresFullMatrixExceptTranslate</tt></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"><tt>QSGMaterial::CustomCompileStep</tt></td><td class="topAlign"><tt>0x0010</tt></td><td class="topAlign">Starting with Qt 5.2, the scene graph will not always call</td></tr>
</table>
<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"><a name="compare"></a><span class="type">int</span> QSGMaterial::<span class="name">compare</span>(const <span class="type">QSGMaterial</span> *<i> other</i>) const<tt> [virtual]</tt></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"><a name="createShader"></a><span class="type"><a href="qsgmaterialshader.html">QSGMaterialShader</a></span> * QSGMaterial::<span class="name">createShader</span>() const<tt> [pure virtual]</tt></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"><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"><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"><a name="type"></a><span class="type"><a href="qsgmaterialtype.html">QSGMaterialType</a></span> * QSGMaterial::<span class="name">type</span>() const<tt> [pure virtual]</tt></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> 2013 Digia Plc and/or its
   subsidiaries. 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>    Digia, Qt and their respective logos are trademarks of Digia Plc     in Finland and/or other countries worldwide. All other trademarks are property
   of their respective owners. </p>
</div>
</body>
</html>