問題描述
我正在為我的下一款 Android 游戲編寫一個支持 OpenGL ES 的框架.目前我支持三種不同的精靈繪制技術:
I'm in the process of writing an OpenGL ES powered framework for my next Android game(s). Currently I'm supporting three different techniques of drawing sprites:
- 基本方式:使用頂點數組(慢)
- 使用 vertex-buffer-objects (VBO)(更快)
- 使用 draw_texture 擴展(最快,但僅適用于基本精靈,即不變形)
- the basic way: using vertex arrays (slow)
- using vertex-buffer-objects (VBOs) (faster)
- using the draw_texture extension (fastest, but only for basic sprites, i.e. no transforming)
OpenGL ES 1.0 支持頂點數組,因此每個 Android 設備都支持.我猜大多數(如果不是全部)當前設備也支持 VBO 和 draw_texture.
Vertex arrays are supported in OpenGL ES 1.0 and thus in every Android-device. I'm guessing most (if not all) of the current devices also support VBOs and draw_texture.
我想知道不同設備支持的擴展,而不是猜測.如果大多數設備都支持 VBO,我可以簡化代碼并只關注 VBO + draw_texture.
Instead of guessing, I'd like to know the extensions supported by different devices. If majority of devices support VBOs, I could simplify my code and focus only on VBOs + draw_texture.
了解不同的設備支持什么會很有幫助,因此如果您有 Android 設備,請報告擴展程序列表.:)
It'd be helpful to know what different devices support, so if you have an Android-device, do report the extensions list please. :)
String extensions = gl.glGetString(GL10.GL_EXTENSIONS);
我有一個 HTC Hero,所以接下來我可以分享這些擴展.
I've got a HTC Hero, so I can share those extensions next.
推薦答案
HTC G1 (Android 1.6) 上的 OpenGL ES 擴展:
OpenGL ES extensions on HTC G1 (Android 1.6):
- GL_ARB_texture_env_combine
- GL_ARB_texture_env_crossbar
- GL_ARB_texture_env_dot3
- GL_ARB_texture_mirrored_repeat
- GL_ARB_vertex_buffer_object
- GL_ATI_extended_texture_coordinate_data_formats
- GL_ATI_imageon_misc
- GL_ATI_texture_compression_atitc
- GL_EXT_blend_equation_separate
- GL_EXT_blend_func_separate
- GL_EXT_blend_minmax
- GL_EXT_blend_subtract
- GL_EXT_stencil_wrap
- GL_OES_byte_coordinates
- GL_OES_compressed_pa??letted_texture
- GL_OES_draw_texture
- GL_OES_fixed_point
- GL_OES_matrix_palette
- GL_OES_point_size_array
- GL_OES_point_sprite
- GL_OES_read_format
- GL_OES_single_precision
- GL_OES_vertex_buffer_object
- GL_QUALCOMM_vertex_buffer_object
- GL_QUALCOMM_direct_texture
HTC G1 (Android 1.6) 上的 OpenGL ES 版本:
OpenGL ES version on HTC G1 (Android 1.6):
- OpenGL ES 1.0-CM
我將包含以下人檢索到的版本:gl.glGetString(GL10.GL_VERSION)
I'm including the version as retrieved by:
gl.glGetString(GL10.GL_VERSION)
這很有趣,因為它不遵循規范.配置文件應該在數字之前.還需要確定能力.例如,Droid 不會在其擴展列表中報告 VBO 支持.但是,它確實報告了 1.1 的 OpenGL ES 版本.這意味著它確實支持 VBO,因為 VBO 在 1.1 版本中是強制性的.
It's pretty interesting in that it doesn't follow the specification. The profile is supposed to be before the number. It is also needed to determine capabilities. For example, the Droid doesn't report VBO support in its extension list. It does report an OpenGL ES version of 1.1, however. That means it does support VBOs, because VBOs were made mandatory in the 1.1 version.
這篇關于OpenGL 擴展可用于不同的 Android 設備的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!