1page.title=<supports-gl-texture>
2parent.title=The AndroidManifest.xml File
3parent.link=manifest-intro.html
4@jd:body
5
6<dl class="xml">
7
8<dt>syntax:</dt>
9<dd>
10<pre class="stx">
11&lt;supports-gl-texture android:<a href="#name">name</a>="<em>string</em>" /&gt;
12</pre>
13</dd>
14
15<dt>contained in:</dt>
16<dd><code><a href="{@docRoot}guide/topics/manifest/manifest-element.html">&lt;manifest&gt;</a></code></dd>
17
18 <div class="sidebox-wrapper">
19  <img id="rule" src="{@docRoot}assets/images/grad-rule-qv.png">
20  <div id="qv-sub-rule">
21    <img src="{@docRoot}assets/images/icon_play.png"
22    style="float:left;margin:0;padding:0;">
23    <p style="color:#669999;padding-top:1em;">Google Play and <code
24    style="color:#669999;">&lt;supports-gl-texture&gt;</code> elements</p>
25    <p style="margin-top:1em;">Google Play filters applications according
26    to the texture compression formats that they support, to ensure that
27    they can be installed only on devices that can handle their textures
28    properly. Developers can use texture compression filtering
29    as a way of targeting specific device types, based on GPU platform.</p>
30    
31    <p style="margin-top:1em;" class="caution">For important information about how
32    Google Play uses <code>&lt;supports-gl-texture&gt;</code> elements as
33    the basis for filtering, please read <a href="#market-texture-filtering">Google
34    Play and texture compression filtering</a>, below.</p>
35</div> 
36</div>
37
38<dt>description:</dt>
39<dd>Declares a single GL texture compression format that is supported by
40the application.
41
42<p>An application "supports" a GL texture compression format if it is capable of
43providing texture assets that are compressed in that format, once the
44application is installed on a device. The application can provide the
45compressed assets locally, from inside the <code>.apk</code>, or it can download them
46from a server at runtime.</p>
47
48<p>Each <code>&lt;supports-gl-texture&gt;</code> element declares exactly one
49supported texture compression format, specified as the value of a
50<code>android:name</code> attribute. If your application supports multiple
51texture compression formats, you can declare multiple
52<code>&lt;supports-gl-texture&gt;</code> elements. For example:</p>
53
54<pre>&lt;supports-gl-texture android:name="GL_OES_compressed_ETC1_RGB8_texture" /&gt;
55&lt;supports-gl-texture android:name="GL_OES_compressed_paletted_texture" /&gt;</pre>
56
57<p>Declared <code>&lt;supports-gl-texture&gt;</code> elements are informational,
58meaning that the Android system itself does not examine the elements at install
59time to ensure matching support on the device. However, other services
60(such as Google Play) or applications can check your application's
61<code>&lt;supports-gl-texture&gt;</code> declarations as part of handling or
62interacting with your application. For this reason, it's very important that
63you declare all of the texture compression formats (from the list below) that
64your application is capable of supporting. </p>
65
66<p>Applications and devices typically declare their supported GL texture
67compression formats using the same set of well-known strings, as listed below.
68The set of format strings may grow over time, as needed, and since the values
69are strings, applications are free to declare other formats as needed.</p>
70
71<p>Assuming that the application is built with SDK Platform Tools r3 or higher,
72filtering based on the <code>&lt;supports-gl-texture></code> element is activated
73for all API levels.</p>
74
75<dt>attributes:</dt>
76
77<dd>
78<dl class="attr">
79
80  <dt><a name="name"></a>{@code android:name}</dt>
81  <dd>Specifies a single GL texture compression format supported by the application,
82  as a descriptor string. Common descriptor values are listed in the table below.
83
84<table>
85<tr>
86<th>Texture Compression Format Descriptor</th>
87<th>Comments</th>
88</tr>
89<tr>
90<td><code>GL_OES_compressed_ETC1_RGB8_texture</code></td>
91<td>Ericsson texture compression. Specified in OpenGL ES 2.0 and available in all
92Android-powered devices that support OpenGL ES 2.0.</td>
93</tr>
94<tr>
95<td><code>GL_OES_compressed_paletted_texture</code></td>
96<td>Generic paletted texture compression.</td>
97</tr>
98<tr>
99<td><code>GL_AMD_compressed_3DC_texture</code></td>
100<td>ATI 3Dc texture compression. </td>
101</tr>
102<tr>
103<td><code>GL_AMD_compressed_ATC_texture</code></td>
104<td>ATI texture compression. Available on devices running Adreno GPU, including
105HTC Nexus One, Droid Incredible, EVO, and others. For widest compatibility,
106devices may also declare a <code>&lt;supports-gl-texture&gt;</code> element with the
107descriptor <code>GL_ATI_texture_compression_atitc</code>. </td>
108</tr>
109<tr>
110<td><code>GL_EXT_texture_compression_latc</code></td>
111<td>Luminance alpha texture compression. </td>
112</tr>
113<tr>
114<td><code>GL_EXT_texture_compression_dxt1</code></td>
115<td>S3 DXT1 texture compression. Supported on devices running Nvidia Tegra2
116platform, including Motorala Xoom, Motorola Atrix, Droid Bionic, and
117others.</td>
118</tr>
119<tr>
120<td><code>GL_EXT_texture_compression_s3tc</code></td>
121<td>S3 texture compression, nonspecific to DXT variant. Supported on devices
122running Nvidia Tegra2 platform, including Motorala Xoom, Motorola Atrix, Droid
123Bionic, and others. If your application requires a specific DXT variant, declare
124that descriptor instead of this one.</td>
125</tr>
126<tr>
127<td><code>GL_IMG_texture_compression_pvrtc</code></td>
128<td>PowerVR texture compression. Available in devices running PowerVR SGX530/540
129GPU, such as Motorola DROID series; Samsung Galaxy S, Nexus S, and Galaxy Tab;
130and others.</td>
131</tr>
132</table>
133
134</dd>
135</dl></dd>
136
137<!-- ##api level indication##
138<dt>introduced in:</dt>
139<dd>API Level </dd>-->
140
141<dt>see also:</dt>
142<dd>
143  <ul>
144    <li><a href="{@docRoot}guide/google/play/filters.html">Filters on Google Play</a></li>
145  </ul>
146</dd>
147
148<h2 id="market-texture-filtering">Google Play and texture compression filtering</h2>
149
150<p>Google Play filters the applications that are visible to users, so that
151users can see and download only those applications that are compatible with
152their devices. One of the ways it filters applications is by texture
153compression compatibility, giving you control over the availability of your
154application to various devices, based on the capabilities of their GPUs.</p>
155
156<p>To determine an application's texture compression compatibility with a given
157user's device, Google Play compares:</p>
158
159<ul>
160<li>Texture compression formats that are supported by the application &mdash;
161an application declares its supported texture compression formats in
162<code>&lt;supports-gl-texture&gt;</code> elements in its manifest <br/>with...</li>
163<li>Texture compression formats that are supported by the GPU on the device &mdash;
164a device reports the formats it supports as read-only system properties.</li>
165</ul>
166
167<p>Each time you upload an application to the Google Play publisher site,
168Google Play scans the application's manifest file and looks for any
169<code>&lt;supports-gl-texture&gt;</code> elements. It extracts the
170format descriptors from the elements and stores them internally as
171metadata associated with the application <code>.apk</code> and the application
172version. </p>
173
174<p>When a user searches or browses for applications on Google Play,
175the service compares the texture compression formats supported by the application
176with those supported by the user's device. The comparison is based on the format
177descriptor strings and a match must be exact.</p>
178
179<p>If <em>any</em> of an application's supported texture compression formats is
180also supported by the device, Google Play allows the user to see the
181application and potentially download it. Otherwise, if none of the application's
182formats is supported by the device, Google Play filters the application so
183that it is not available for download. </p>
184
185<p>If an application does not declare any <code>&lt;supports-gl-texture&gt;</code> elements,
186Google Play does not apply any filtering based on GL texture compression format.</p>
187
188</dl>
189
190