<supports-gl-texture>
透過集合功能整理內容
你可以依據偏好儲存及分類內容。
注意:Google Play 會根據應用程式支援的紋理壓縮格式篩選應用程式,讓應用程式只在可適當處理其紋理的裝置上安裝。您可以使用紋理壓縮篩選功能,做為根據 GPU 平台指定特定裝置類型的方法。
如要深入瞭解 Google Play 如何使用 <supports-gl-texture>
元素做為篩選依據,請參閱「Google Play 和紋理壓縮篩選功能」一節。
- 語法:
-
<supports-gl-texture
android:name="string" />
- 包含於:
<manifest>
- 說明:
- 宣告應用程式支援的單一 GL 紋理壓縮格式。
如果應用程式在裝置上安裝後,能提供 GL 紋理壓縮格式的紋理素材資源,表示其「支援」這類格式。
應用程式可以在本機從 APK 中提供經壓縮的素材資源,也可以在執行階段從伺服器下載。
每個 <supports-gl-texture>
元素只會宣告一種支援的紋理壓縮格式,指定為 android:name
屬性的值。如果您的應用程式支援多種紋理壓縮格式,您可以宣告多個 <supports-gl-texture>
元素:
<supports-gl-texture android:name="GL_OES_compressed_ETC1_RGB8_texture" />
<supports-gl-texture android:name="GL_OES_compressed_paletted_texture" />
<supports-gl-texture>
元素會提供資訊,這意味著 Android 系統本身在安裝時不會檢查元素,因此無法確保裝置提供相應支援。
不過,其他服務 (例如 Google Play) 或應用程式可能會在處理您的應用程式或與其互動時,檢查其中的 <supports-gl-texture>
宣告。因此,請務必宣告下列清單中應用程式支援的所有紋理壓縮格式。
應用程式和裝置通常會使用以下的一組常用字串,宣告支援的 GL 紋理壓縮格式。這組格式字串可能會視需求隨著時間增加。由於此值為字串,應用程式可視需要宣告其他格式。
假如應用程式是以 SDK Platform Tools r3 以上版本建構,則系統會為所有 API 級別啟用根據 <supports-gl-texture>
元素進行篩選的功能。
- 屬性:
-
android:name
- 將應用程式支援的單一 GL 紋理壓縮格式指定為描述元字串。下表列出常見的描述元值。
紋理壓縮格式描述元 |
註解 |
GL_OES_compressed_ETC1_RGB8_texture |
Ericsson 材質壓縮。指定於 OpenGL ES 2.0,且適用於所有支援 OpenGL ES 2.0 的 Android 裝置。 |
GL_OES_compressed_paletted_texture |
一般區塊面板材質壓縮。 |
GL_AMD_compressed_3DC_texture |
ATI 3Dc 材質壓縮。 |
GL_AMD_compressed_ATC_texture |
ATI 材質壓縮。適用於執行 Adreno GPU 的裝置,包括 HTC Nexus One、Droid Incredible、EVO 等。若要獲得最大相容性,裝置也可以宣告包含描述元 GL_ATI_texture_compression_atitc 的 <supports-gl-texture> 元素。 |
GL_EXT_texture_compression_latc |
照度 Alpha 材質壓縮。 |
GL_EXT_texture_compression_dxt1 |
S3 DXT1 材質壓縮。搭載 Nvidia Tegra2 平台的裝置皆支援這項格式,包括 Motorala Xoom、Motorola Atrix、Droid Bionic 等。 |
GL_EXT_texture_compression_s3tc |
S3 紋理壓縮,這並非 DXT 變化版本的特定格式。搭載 Nvidia Tegra2 平台的裝置皆支援這項格式,包括 Motorala Xoom、Motorola Atrix、Droid Bionic 等。如果您的應用程式需要特定的 DXT 變化版本,請宣告該描述元而非此描述元。 |
GL_IMG_texture_compression_pvrtc |
PowerVR 材質壓縮。適用於搭載 PowerVR SGX530/540 GPU 的裝置,例如 Motorola DROID 系列、Samsung Galaxy S、Nexus S 和 Galaxy Tab 等。 |
- 另請參閱:
-
Google Play 和材質壓縮篩選功能
Google Play 會篩選向使用者顯示的應用程式,讓使用者只能查看及下載與其裝置相容的應用程式。其中一種應用程式篩選方法是透過紋理壓縮相容性,讓您依據裝置上 GPU 的功能,控管應用程式可在哪些裝置上使用。
為了判斷應用程式與特定使用者裝置間的紋理壓縮相容性,Google Play 會比較下列項目:
- 應用程式在資訊清單的
<supports-gl-texture>
元素中,宣告支援的紋理壓縮格式。
- 裝置上 GPU 支援的紋理壓縮格式。裝置會以唯讀系統屬性回報支援的格式。
每當您將應用程式上傳到 Google Play 管理中心時,Google Play 都會掃描應用程式的資訊清單檔案,尋找是否有任何 <supports-gl-texture>
元素。它會從元素中擷取格式描述元,並將其儲存在內部,做為與應用程式 APK 和應用程式版本相關聯的中繼資料。
使用者在 Google Play 上搜尋或瀏覽應用程式時,服務會比較應用程式與使用者裝置支援的紋理壓縮格式。比較時會以格式描述元字串為依據,且必須與該字串完全相符。
如果某個應用程式支援的「任何」紋理壓縮格式同樣受到裝置支援,Google Play 會允許使用者查看並視需求下載該應用程式。如果裝置不支援應用程式支援的任何格式,Google Play 會篩除該應用程式,讓使用者無法下載。
如果應用程式未宣告任何 <supports-gl-texture>
元素,則 Google Play 不會根據 GL 紋理壓縮格式套用任何篩選條件。
這個頁面中的內容和程式碼範例均受《內容授權》中的授權所規範。Java 與 OpenJDK 是 Oracle 和/或其關係企業的商標或註冊商標。
上次更新時間:2025-07-27 (世界標準時間)。
[[["容易理解","easyToUnderstand","thumb-up"],["確實解決了我的問題","solvedMyProblem","thumb-up"],["其他","otherUp","thumb-up"]],[["缺少我需要的資訊","missingTheInformationINeed","thumb-down"],["過於複雜/步驟過多","tooComplicatedTooManySteps","thumb-down"],["過時","outOfDate","thumb-down"],["翻譯問題","translationIssue","thumb-down"],["示例/程式碼問題","samplesCodeIssue","thumb-down"],["其他","otherDown","thumb-down"]],["上次更新時間:2025-07-27 (世界標準時間)。"],[],[],null,["# <supports-gl-texture\u003e\n\n**Note:**Google Play filters applications according\nto the texture compression formats that they support so that\nthey install only on devices that can handle their textures\nproperly. You can use texture compression filtering\nas a way of targeting specific device types based on the GPU platform.\n\nFor important information about how\nGoogle Play uses `\u003csupports-gl-texture\u003e` elements as\nthe basis for filtering, read the [Google\nPlay and texture compression filtering](#market-texture-filtering) section.\n\nsyntax:\n:\n\n ```xml\n \u003csupports-gl-texture\n android:name=\"string\" /\u003e\n ```\n\ncontained in:\n: [\u003cmanifest\u003e](/guide/topics/manifest/manifest-element)\n\ndescription:\n\n: Declares a single GL texture compression format that the app supports. An application \"supports\" a GL texture compression format if it can\n provide texture assets compressed in that format when the application installs on a device.\n\n The application provides the\n compressed assets locally, from inside the APK, or it can download them\n from a server at runtime.\n\n Each `\u003csupports-gl-texture\u003e` element declares exactly one\n supported texture compression format, specified as the value of a\n `android:name` attribute. If your application supports multiple\n texture compression formats, you can declare multiple\n `\u003csupports-gl-texture\u003e` elements: \n\n ```xml\n \u003csupports-gl-texture android:name=\"GL_OES_compressed_ETC1_RGB8_texture\" /\u003e\n \u003csupports-gl-texture android:name=\"GL_OES_compressed_paletted_texture\" /\u003e\n ```\n\n `\u003csupports-gl-texture\u003e` elements are informational,\n meaning that the Android system itself does not examine the elements at install\n time to ensure matching support on the device.\n\n However, other services,\n such as Google Play, or applications can check your application's\n `\u003csupports-gl-texture\u003e` declarations as part of handling or\n interacting with your application. For this reason, it's very important that\n you declare all the texture compression formats from the following list that\n your application supports.\n\n Applications and devices typically declare their supported GL texture\n compression formats using the following set of well-known strings.\n The set of format strings might grow over time, as needed. Since the values\n are strings, applications are free to declare other formats as needed.\n\n Assuming that the application is built with SDK Platform Tools r3 or higher,\n filtering based on the `\u003csupports-gl-texture\u003e` element is activated\n for all API levels.\n\nattributes:\n:\n\n `android:name`\n : Specifies a single GL texture compression format supported by the application\n as a descriptor string. Common descriptor values are listed in the following table.\n\n | Texture compression format descriptor | Comments |\n |---------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n | `GL_OES_compressed_ETC1_RGB8_texture` | Ericsson texture compression. Specified in OpenGL ES 2.0 and available in all Android-powered devices that support OpenGL ES 2.0. |\n | `GL_OES_compressed_paletted_texture` | Generic paletted texture compression. |\n | `GL_AMD_compressed_3DC_texture` | ATI 3Dc texture compression. |\n | `GL_AMD_compressed_ATC_texture` | 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 `\u003csupports-gl-texture\u003e` element with the descriptor `GL_ATI_texture_compression_atitc`. |\n | `GL_EXT_texture_compression_latc` | Luminance alpha texture compression. |\n | `GL_EXT_texture_compression_dxt1` | S3 DXT1 texture compression. Supported on devices running the Nvidia Tegra2 platform, including Motorala Xoom, Motorola Atrix, Droid Bionic, and others. |\n | `GL_EXT_texture_compression_s3tc` | S3 texture compression, nonspecific to DXT variant. Supported on devices running the 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. |\n | `GL_IMG_texture_compression_pvrtc` | PowerVR texture compression. Available on devices running the PowerVR SGX530/540 GPU, such as Motorola DROID series; Samsung Galaxy S, Nexus S, and Galaxy Tab; and others. |\n\n\nsee also:\n:\n - [Filters on Google Play](/google/play/filters)"]]