views:

2758

answers:

9

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:

  • 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)

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.

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.

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);

I've got a HTC Hero, so I can share those extensions next.

+2  A: 

OpenGL ES extensions on HTC Hero (Android 1.5):

  • 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
MH114
+3  A: 

OpenGL ES extensions on Nexus One (Android 2.1):

  • GL_AMD_compressed_3DC_texture
  • GL_AMD_compressed_ATC_texture
  • GL_ARB_texture_env_combine
  • GL_ARB_texture_env_dot3
  • GL_ARB_texture_mirrored_repeat
  • GL_ARB_vertex_buffer_object
  • GL_ATI_compressed_texture_atitc
  • 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_EGL_image
  • GL_OES_blend_equation_separate
  • GL_OES_blend_func_separate
  • GL_OES_blend_subtract
  • GL_OES_compressed_ETC1_RGB8_texture
  • GL_OES_compressed_paletted_texture
  • GL_OES_draw_texture
  • GL_OES_extended_matrix_palette
  • GL_OES_framebuffer_object
  • GL_OES_matrix_palette
  • GL_OES_point_size_array
  • GL_OES_point_sprite
  • GL_OES_read_format
  • GL_OES_stencil_wrap
  • GL_OES_texture_cube_map
  • GL_OES_texture_env_crossbar
  • GL_OES_texture_mirrored_repeat
Ben Gotow
Note: In OS 2.1, the functions in GL_OES_framebuffer_object were not usable from the Java API. Calling them just threw an exception. Android developer relations confirmed that they forgot to implement these. (yeah...) It's apparently been fixed in 2.2, though I haven't tested.
Ben Gotow
+3  A: 

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_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 version on HTC G1 (Android 1.6):

  • OpenGL ES 1.0-CM

I'm including the version as retrieved by:
gl.glGetString(GL10.GL_VERSION)

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.

Lance Nanek
Thanks, and good point about OpenGL ES 1.1 / Droid!
MH114
+2  A: 

Just got a Droid running Android 2.0.1.

GL_EXTENSIONS:

  • GL_OES_byte_coordinates
  • GL_OES_fixed_point
  • GL_OES_single_precision
  • GL_OES_matrix_get
  • GL_OES_read_format
  • GL_OES_compressed_paletted_texture
  • GL_OES_point_sprite
  • GL_OES_point_size_array
  • GL_OES_matrix_palette
  • GL_OES_draw_texture
  • GL_OES_query_matrix
  • GL_OES_texture_env_crossbar
  • GL_OES_texture_mirrored_repeat
  • GL_OES_texture_cube_map
  • GL_OES_blend_subtract
  • GL_OES_blend_func_separate
  • GL_OES_blend_equation_separate
  • GL_OES_stencil_wrap
  • GL_OES_extended_matrix_palette
  • GL_OES_framebuffer_object
  • GL_OES_rgb8_rgba8
  • GL_OES_depth24
  • GL_OES_stencil8
  • GL_OES_compressed_ETC1_RGB8_texture
  • GL_OES_mapbuffer
  • GL_OES_EGL_image
  • GL_EXT_multi_draw_arrays
  • GL_OES_required_internalformat
  • GL_IMG_read_format
  • GL_IMG_texture_compression_pvrtc
  • GL_IMG_texture_format_BGRA8888
  • GL_EXT_texture_format_BGRA8888
  • GL_IMG_texture_stream
  • GL_IMG_vertex_program

GL_VERSION:

  • OpenGL ES-CM 1.1

GL_RENDERER:

  • PowerVR SGX 530

GL_VENDOR:

  • Imagination Technologies

GL_ALIASED_POINT_SIZE_RANGE:

  • 1, 32

GL_SMOOTH_POINT_SIZE_RANGE:

  • 1, 1
Lance Nanek
+2  A: 

Archos 5 internet tablet running Android 1.6:

GL_VERSION:

  • OpenGL ES-CM 1.0

GL_EXTENSIONS:

  • GL_OES_byte_coordinates
  • GL_OES_fixed_point
  • GL_OES_single_precision
  • GL_OES_read_format
  • GL_OES_compressed_paletted_texture
  • GL_OES_draw_texture
  • GL_OES_matrix_get
  • GL_OES_query_matrix
  • GL_ARB_texture_compression
  • GL_ARB_texture_non_power_of_two
  • GL_ANDROID_direct_texture
  • GL_ANDROID_user_clip_plane
  • GL_ANDROID_vertex_buffer_object
  • GL_ANDROID_generate_mipmap

GL_RENDERER:

  • Android PixelFlinger 1.0

GL_VENDOR:

  • Android

GL_ALIASED_POINT_SIZE_RANGE:

  • 0, 134217727

GL_SMOOTH_POINT_SIZE_RANGE:

  • 0, 2048

Guess that means there is no OpenGL hardware acceleration.

Lance Nanek
+3  A: 

OpenGL ES info for HTC Desire (AU)

GL_EXTENSIONS:

  • GL_AMD_compressed_3DC_texture
  • GL_AMD_compressed_ATC_texture
  • GL_ARB_texture_env_combine
  • GL_ARB_texture_env_dot3
  • GL_ARB_texture_mirrored_repeat
  • GL_ARB_vertex_buffer_object
  • GL_ATI_compressed_texture_atitc
  • 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_EGL_image
  • GL_OES_blend_equation_separate
  • GL_OES_blend_func_separate
  • GL_OES_blend_subtract
  • GL_OES_compressed_ETC1_RGB8_texture
  • GL_OES_compressed_paletted_texture
  • GL_OES_draw_texture
  • GL_OES_extended_matrix_palette
  • GL_OES_framebuffer_object
  • GL_OES_matrix_palette
  • GL_OES_point_size_array
  • GL_OES_point_sprite
  • GL_OES_read_format
  • GL_OES_stencil_wrap
  • GL_OES_texture_cube_map
  • GL_OES_texture_env_crossbar
  • GL_OES_texture_mirrored_repeat

GL_VERSION:

  • OpenGL ES-CM 1.1

GL_RENDERER:

  • Adreno

GL_VENDOR:

  • Qualcomm
David Thornley
+3  A: 

Here is the info for Samsung GT-I5700 (Spica / Galaxy Spica) with Android 1.5:

GL_VERSION:

  • 1.1 (lib version 11.02.72)

GL_RENDERER:

  • FIMG

GL_VENDOR:

  • Samsung Electronics

GL_EXTENSIONS:

  • GL_OES_matrix_palette
  • GL_OES_draw_texture
  • GL_OES_framebuffer_object
  • GL_OES_matrix_get
  • GL_ARB_texture_non_power_of_two
w126
+3  A: 

Here's a HTC Evo 4G running Android 2.1-update1 (Thanks Google IO):

GL_VERSION:

  • OpenGL ES-CM 1.1

GL_EXTENSIONS:

  • GL_AMD_compressed_3DC_texture
  • GL_AMD_compressed_ATC_texture
  • GL_ARB_texture_env_combine
  • GL_ARB_texture_env_dot3
  • GL_ARB_texture_mirrored_repeat
  • GL_ARB_vertex_buffer_object
  • GL_ATI_compressed_texture_atitc
  • 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_EGL_image
  • GL_OES_blend_equation_separate
  • GL_OES_blend_func_separate
  • GL_OES_blend_subtract
  • GL_OES_compressed_ETC1_RGB8_texture
  • GL_OES_compressed_paletted_texture
  • GL_OES_draw_texture
  • GL_OES_extended_matrix_palette
  • GL_OES_framebuffer_object
  • GL_OES_matrix_palette
  • GL_OES_point_size_array
  • GL_OES_point_sprite
  • GL_OES_read_format
  • GL_OES_stencil_wrap
  • GL_OES_texture_cube_map
  • GL_OES_texture_env_crossbar
  • GL_OES_texture_mirrored_repeat

GL_RENDERER:

  • Adreno

GL_VENDOR:

  • Qualcomm

GL_ALIASED_POINT_SIZE_RANGE:

  • 1, 128

GL_SMOOTH_POINT_SIZE_RANGE:

  • 1, 128

I thought performance would duplicate the Nexus one. It has the same renderer/processor after all. The screen is TFT instead of OLED, but the same resolution. One of my games that takes 16-18ms per frame on the N1 takes 33-34ms on this, however. I haven't looked into why yet. The number looks suspiciously like it would if the screen only ran at 30Hz instead of 60Hz. I haven't confirmed that yet, though.

Lance Nanek
+1  A: 

Looks like Dave Webb has a point.

Here is what I have with the original Droid using Android 2.1, which differs from what had been reported here for the Droid with Android 2.0.1. Still no VBO, which is weak.

GL Version

  • OpenGL ES 2.0

GL Vendor

  • Imagination Technologies

GL Renderer

  • PowerVR SGX 530

GL Extensions

  • GL_OES_rgb8_rgba8
  • GL_OES_depth24
  • GL_OES_vertex_half_float
  • GL_OES_texture_float
  • GL_OES_texture_half_float
  • GL_OES_element_index_uint
  • GL_OES_mapbuffer
  • GL_OES_fragment_precision_high
  • GL_OES_compressed_ETC1_RGB8_texture
  • GL_OES_EGL_image
  • GL_OES_required_internalformat
  • GL_OES_depth_texture
  • GL_OES_get_program_binary
  • GL_OES_packed_depth_stencil
  • GL_OES_standard_derivatives
  • GL_EXT_multi_draw_arrays
  • GL_EXT_texture_format_BGRA8888
  • GL_EXT_discard_framebuffer
  • GL_IMG_shader_binary
  • GL_IMG_texture_compression_pvrtc
  • GL_IMG_texture_stream2
  • GL_IMG_texture_npot
  • GL_IMG_texture_format_BGRA8888
  • GL_IMG_read_format
  • GL_IMG_program_binary
  • GL_IMG_vertex_array_object
EboMike