可在不同的Andr​​oid设备OpenGL扩展可在、不同、设备、Andr

2023-09-11 20:15:15 作者:世界这么乱,脆弱给谁看

我在写一个OpenGL ES的动力框架我的下一个Android的游戏(S)的进程。目前我支持三种不同的绘图精灵的技巧:

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:

的基本途径:使用顶点数组(慢) 使用顶点缓冲对象(维也纳组织)(快) 使用 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的设备支持。我猜目前大多数设备(如果不是全部)也支持维也纳各组织和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.

而不是猜测,我想知道用不同的设备所支持的扩展。如果大多数设备支持维也纳组织,我能简化我的code和只专注于维也纳各组织+ 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.

推荐答案

的OpenGL ES的HTC G1的扩展(安卓1.6):

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_com pression_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_com pressed_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 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_paletted_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

的OpenGL ES版本的HTC G1(安卓1.6):

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)

这是pretty的,因为它不符合规范有趣。配置文件应该是在数字前。它也需要确定能力。例如,在Droid不报告VBO支持其扩展名列表。然而,这确实报告一个OpenGL ES版本1.1。这意味着它不支持维也纳组织,由于维也纳各组织是在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.

 
精彩推荐
图片推荐