Home | History | Annotate | Download | only in manifest
      1 page.title=<supports-gl-texture>
      2 parent.title=The AndroidManifest.xml File
      3 parent.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_market.jpg"
     22     style="float:left;margin:0;padding:0;">
     23     <p style="color:#669999;">Android Market and <code
     24     style="color:#669999;">&lt;supports-gl-texture&gt;</code> elements</p>
     25     <p style="margin-top:1em;">Android Market 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     Android Market uses <code>&lt;supports-gl-texture&gt;</code> elements as
     33     the basis for filtering, please read <a href="#market-texture-filtering">Android
     34     Market 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
     40 the application.
     41 
     42 <p>An application "supports" a GL texture compression format if it is capable of
     43 providing texture assets that are compressed in that format, once the
     44 application is installed on a device. The application can provide the
     45 compressed assets locally, from inside the <code>.apk</code>, or it can download them
     46 from a server at runtime.</p>
     47 
     48 <p>Each <code>&lt;supports-gl-texture&gt;</code> element declares exactly one
     49 supported texture compression format, specified as the value of a
     50 <code>android:name</code> attribute. If your application supports multiple
     51 texture 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,
     58 meaning that the Android system itself does not examine the elements at install
     59 time to ensure matching support on the device. However, other services
     60 (such as Android Market) or applications can check your application's
     61 <code>&lt;supports-gl-texture&gt;</code> declarations as part of handling or
     62 interacting with your application. For this reason, it's very important that
     63 you declare all of the texture compression formats (from the list below) that
     64 your application is capable of supporting. </p>
     65 
     66 <p>Applications and devices typically declare their supported GL texture
     67 compression formats using the same set of well-known strings, as listed below.
     68 The set of format strings may grow over time, as needed, and since the values
     69 are 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,
     72 filtering based on the <code>&lt;supports-gl-texture></code> element is activated
     73 for 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
     92 Android-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
    105 HTC Nexus One, Droid Incredible, EVO, and others. For widest compatibility,
    106 devices may also declare a <code>&lt;supports-gl-texture&gt;</code> element with the
    107 descriptor <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
    116 platform, including Motorala Xoom, Motorola Atrix, Droid Bionic, and
    117 others.</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
    122 running Nvidia Tegra2 platform, including Motorala Xoom, Motorola Atrix, Droid
    123 Bionic, and others. If your application requires a specific DXT variant, declare
    124 that 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
    129 GPU, such as Motorola DROID series; Samsung Galaxy S, Nexus S, and Galaxy Tab;
    130 and 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/appendix/market-filters.html">Android Market Filters</a></li>
    145   </ul>
    146 </dd>
    147 
    148 <h2 id="market-texture-filtering">Android Market and texture compression filtering</h2>
    149 
    150 <p>Android Market filters the applications that are visible to users, so that
    151 users can see and download only those applications that are compatible with
    152 their devices. One of the ways Market filters applications is by texture
    153 compression compatibility, giving you control over the availability of your
    154 application 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
    157 user's device, Android Market compares:</p>
    158 
    159 <ul>
    160 <li>Texture compression formats that are supported by the application &mdash;
    161 an 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;
    164 a 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 Android Market Publisher Site,
    168 Android Market scans the application's manifest file and looks for any
    169 <code>&lt;supports-gl-texture&gt;</code> elements. It extracts the
    170 format descriptors from the elements and stores them internally as
    171 metadata associated with the application <code>.apk</code> and the application
    172 version. </p>
    173 
    174 <p>When a user searches or browses for applications on Android Market,
    175 the service compares the texture compression formats supported by the application
    176 with those supported by the user's device. The comparison is based on the format
    177 descriptor strings and a match must be exact.</p>
    178 
    179 <p>If <em>any</em> of an application's supported texture compression formats is
    180 also supported by the device, Android Market allows the user to see the
    181 application and potentially download it. Otherwise, if none of the application's
    182 formats is supported by the device, Android Market filters the application so
    183 that 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,
    186 Android Market does not apply any filtering based on GL texture compression format.</p>
    187 
    188 </dl>
    189 
    190