blob: 65d3d4042db01c6461c73ca50137a57d1a0feab1 [file] [log] [blame]
page.title=<supports-gl-texture>
parent.title=The AndroidManifest.xml File
parent.link=manifest-intro.html
@jd:body
<div class="sidebox-wrapper">
<div class="sidebox">
<img src="{@docRoot}assets/images/icon_play.png" style="float:left;margin:0;padding:0;">
<p style="color:#669999;padding-top:1em;">Google Play Filtering</p>
<p style="padding-top:1em;">Google Play filters applications according
to the texture compression formats that they support, to ensure that
they can be installed only on devices that can handle their textures
properly. You can use texture compression filtering
as a way of targeting specific device types, based on GPU platform.</p>
<p style="margin-top:1em;">For important information about how
Google Play uses <code>&lt;supports-gl-texture&gt;</code> elements as
the basis for filtering, please read <a href="#market-texture-filtering">Google
Play and texture compression filtering</a>, below.</p>
</div>
</div>
<dl class="xml">
<dt>syntax:</dt>
<dd>
<pre class="stx">
&lt;supports-gl-texture
android:<a href="#name">name</a>="<em>string</em>" /&gt;
</pre>
</dd>
<dt>contained in:</dt>
<dd><code><a href="{@docRoot}guide/topics/manifest/manifest-element.html">&lt;manifest&gt;</a></code></dd>
<dt>description:</dt>
<dd>Declares a single GL texture compression format that is supported by
the application.
<p>An application "supports" a GL texture compression format if it is capable of
providing texture assets that are compressed in that format, once the
application is installed on a device. The application can provide the
compressed assets locally, from inside the <code>.apk</code>, or it can download them
from a server at runtime.</p>
<p>Each <code>&lt;supports-gl-texture&gt;</code> element declares exactly one
supported texture compression format, specified as the value of a
<code>android:name</code> attribute. If your application supports multiple
texture compression formats, you can declare multiple
<code>&lt;supports-gl-texture&gt;</code> elements. For example:</p>
<pre>&lt;supports-gl-texture android:name="GL_OES_compressed_ETC1_RGB8_texture" /&gt;
&lt;supports-gl-texture android:name="GL_OES_compressed_paletted_texture" /&gt;</pre>
<p>Declared <code>&lt;supports-gl-texture&gt;</code> elements are informational,
meaning that the Android system itself does not examine the elements at install
time to ensure matching support on the device. However, other services
(such as Google Play) or applications can check your application's
<code>&lt;supports-gl-texture&gt;</code> declarations as part of handling or
interacting with your application. For this reason, it's very important that
you declare all of the texture compression formats (from the list below) that
your application is capable of supporting. </p>
<p>Applications and devices typically declare their supported GL texture
compression formats using the same set of well-known strings, as listed below.
The set of format strings may grow over time, as needed, and since the values
are strings, applications are free to declare other formats as needed.</p>
<p>Assuming that the application is built with SDK Platform Tools r3 or higher,
filtering based on the <code>&lt;supports-gl-texture></code> element is activated
for all API levels.</p>
<dt>attributes:</dt>
<dd>
<dl class="attr">
<dt><a name="name"></a>{@code android:name}</dt>
<dd>Specifies a single GL texture compression format supported by the application,
as a descriptor string. Common descriptor values are listed in the table below.
<table>
<tr>
<th>Texture Compression Format Descriptor</th>
<th>Comments</th>
</tr>
<tr>
<td><code>GL_OES_compressed_ETC1_RGB8_texture</code></td>
<td>Ericsson texture compression. Specified in OpenGL ES 2.0 and available in all
Android-powered devices that support OpenGL ES 2.0.</td>
</tr>
<tr>
<td><code>GL_OES_compressed_paletted_texture</code></td>
<td>Generic paletted texture compression.</td>
</tr>
<tr>
<td><code>GL_AMD_compressed_3DC_texture</code></td>
<td>ATI 3Dc texture compression. </td>
</tr>
<tr>
<td><code>GL_AMD_compressed_ATC_texture</code></td>
<td>ATI texture compression. Available on devices running Adreno GPU, including
HTC Nexus One, Droid Incredible, EVO, and others. For widest compatibility,
devices may also declare a <code>&lt;supports-gl-texture&gt;</code> element with the
descriptor <code>GL_ATI_texture_compression_atitc</code>. </td>
</tr>
<tr>
<td><code>GL_EXT_texture_compression_latc</code></td>
<td>Luminance alpha texture compression. </td>
</tr>
<tr>
<td><code>GL_EXT_texture_compression_dxt1</code></td>
<td>S3 DXT1 texture compression. Supported on devices running Nvidia Tegra2
platform, including Motorala Xoom, Motorola Atrix, Droid Bionic, and
others.</td>
</tr>
<tr>
<td><code>GL_EXT_texture_compression_s3tc</code></td>
<td>S3 texture compression, nonspecific to DXT variant. Supported on devices
running Nvidia Tegra2 platform, including Motorala Xoom, Motorola Atrix, Droid
Bionic, and others. If your application requires a specific DXT variant, declare
that descriptor instead of this one.</td>
</tr>
<tr>
<td><code>GL_IMG_texture_compression_pvrtc</code></td>
<td>PowerVR texture compression. Available in devices running PowerVR SGX530/540
GPU, such as Motorola DROID series; Samsung Galaxy S, Nexus S, and Galaxy Tab;
and others.</td>
</tr>
</table>
</dd>
</dl></dd>
<!-- ##api level indication##
<dt>introduced in:</dt>
<dd>API Level </dd>-->
<dt>see also:</dt>
<dd>
<ul>
<li><a href="{@docRoot}google/play/filters.html">Filters on Google Play</a></li>
</ul>
</dd>
<h2 id="market-texture-filtering">Google Play and texture compression filtering</h2>
<p>Google Play filters the applications that are visible to users, so that
users can see and download only those applications that are compatible with
their devices. One of the ways it filters applications is by texture
compression compatibility, giving you control over the availability of your
application to various devices, based on the capabilities of their GPUs.</p>
<p>To determine an application's texture compression compatibility with a given
user's device, Google Play compares:</p>
<ul>
<li>Texture compression formats that are supported by the application &mdash;
an application declares its supported texture compression formats in
<code>&lt;supports-gl-texture&gt;</code> elements in its manifest <br/>with...</li>
<li>Texture compression formats that are supported by the GPU on the device &mdash;
a device reports the formats it supports as read-only system properties.</li>
</ul>
<p>Each time you upload an application to the Google Play publisher site,
Google Play scans the application's manifest file and looks for any
<code>&lt;supports-gl-texture&gt;</code> elements. It extracts the
format descriptors from the elements and stores them internally as
metadata associated with the application <code>.apk</code> and the application
version. </p>
<p>When a user searches or browses for applications on Google Play,
the service compares the texture compression formats supported by the application
with those supported by the user's device. The comparison is based on the format
descriptor strings and a match must be exact.</p>
<p>If <em>any</em> of an application's supported texture compression formats is
also supported by the device, Google Play allows the user to see the
application and potentially download it. Otherwise, if none of the application's
formats is supported by the device, Google Play filters the application so
that it is not available for download. </p>
<p>If an application does not declare any <code>&lt;supports-gl-texture&gt;</code> elements,
Google Play does not apply any filtering based on GL texture compression format.</p>
</dl>