Hands-On Motorola Droid OpenGL ES Specs

The nice people at Verizon let me borrow a Droid for a few days so I'm going to take full advantage of this opportunity to bring you developers some specifications on the 3D capabilities of it. First of all, this phone is fast. How fast? It loads Light Racer 3D in 1/3 the time of my G1. Not only that, but it has a PowerVR SGX530 GPU in it (14 MPolys/s). Hello fast gaming! That's very close to the same chip used in the iPhone 3GS. Not only fast gaming, but all SGX series GPUs supposedly exceed OpenGL ES 2.0 specifications. Android doesn't currently support OpenGL ES2.0, but I have to imagine that with hardware like this on the market, it will soon. I tested Light Racer 3D on this phone and it works extremely well. 45-50 frames per second at 569x320. I have to imagine that it'd run at 60FPS if the screen were HVGA which would make it twice as fast as the G1. Read on for a list of supported OpenGL extensions and other specifications.

Here's what the log showed when initializing OpenGL:

D/libEGL ( 2090): loaded /system/lib/egl/libGLES_android.so
D/libEGL ( 2090): loaded /system/lib/egl/libEGL_POWERVR_SGX530_121.so
D/libEGL ( 2090): loaded /system/lib/egl/libGLESv1_CM_POWERVR_SGX530_121.so
D/libEGL ( 2090): loaded /system/lib/egl/libGLESv2_POWERVR_SGX530_121.so

Droid 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

Native 3D full screen size: 569x320 - that's like WHVGA 16:9. The actual device resolution is 854x480 WVGA so I believe it's scaling for compatibility. My tests are with a 1.5-targeted manifest. Make sure that your games know what to do with the extra screen area! 480x320 HVGA has been the norm until now.
D/WorldRenderer( 2090): OpenGL Surface Changed to (569x320)

Just for kicks, here's the list of OpenGL extensions supported by the G1/MyTouch/Hero:

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

And finally the Android emulator:

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

Summary:

Right off the bat, there are differences in compressed texture formats. I don't know how many people are actually using precompressed textures in Android games at the moment (I'm not), but the qualcomm chip based phones use atitc and the powervr uses pvrtc. That's kind of a pain because I don't think that they are compatible with each other. If I'm wrong, please correct me.

It's hard to say what capabilities it may have because if it truly does support OpenGL ES 2.0, then it must have things like mipmap generation, shaders, vertex programs and the like and wouldn't have to list them as extensions. It does show things like cube maps and vertex program so some of that is on the list.

I tried to run neocore as a benchmark to see how many FPS I get on it but it seems to be targeted specifically for the Qualcomm chip. It runs, but the textures are all checkerboards. For what it's worth - it's smoother than on my G1 despite the lack of normal textures.

I'm really hoping that more phones will start using PowerVR or equivalent chips. They're clearly good and very fast. Don't forget about the millions of G1, MyTouch and Hero users, though. Those phones will continue to be around for a while. The trick is to take full advantage of the new hardware while still running fast enough on the slower GPUs. I believe that a full features game will need to include the ability to run high, medium and low quality graphics configurations to run well on all phones. I'd like to see some code to auto-detect such things.

Overall, this is a device you will want to get your hands on. It's different enough from existing Android phones to where you really won't know what your game looks like or how it runs until you try it on it.

ADB drivers are available here - http://developer.motorola.com/docstools/USB_Drivers/Handset_USB_Driver/
If you use Windows 7, like I do, you may have to extract out the contents of the MSI and install the drivers manually. They do work if installed that way.

16 Comments

Post a comment here or discuss this and other topics in the forums

My new game runs in native

My new game runs in native res at a constant 40FPS with high res textures and multitexturing enabled. I don't know why neocore runs so slowly. The chip in the Droid seems to run 3 times as fast as the G1.

resolution

Any luck setting the screen resolution to the native resolution? The neocore demo uses. Native and is pretty slow on my droid (20 fps)

Check the docs here -

How would I go about loading a PVRTC texture then?

I already have a texture (compressed using PVRTexTool as PVRTC_4BPP) as byte buffer loaded in Java. I've got a texture slot initialized using glGenTextures and it's set active using glBindTexture.

How do I use glCompressedTexImage2D to load the data now? :P

Already tried to find some useful stuff using google but no luck :(

Thanks already :P

Generally if you use an

Generally if you use an unsupported texture format, you'll just get the objects in whatever your current color is. If it's a black screen, I'd check the opengl config first. I had some weirdness when I took Light Racer 3D out of compatibility mode so I just left it in that using a GLSurfaceView and everything was fine.

I'm getting comments from

I'm getting comments from droid users on a simple opengl game saying all they are seeing is a blank screen, although it displays perfectly on the emulator and my HTC Tattoo. Would this be the cause?

Try using the PowerVR PVRTC

Try using the PowerVR PVRTC compressor and then instead of calling glTexImage2D, use glCompressedTexImage2D on the compressed image. Remember, though, that this will ONLY work on the Droid and that every other Android phone uses ATITC. You may want to include both formats and by using the extension list, you'll know which one to upload. If unsure, default to ATITC (for now).

using PVRTC

Interesting article; I'm actually trying to implement the PVRTC texturing in my Droid application. Do you have any idea how to access the GL constants for the PVRTC textures? I don't see them exposed in any of the standard OpenGL ES APIs that come with Android. Do we have to go native to access these extensions or is there another way?

I can see how you'd be

I can see how you'd be anxious for 2.0 You wrote the book on it! :)

Great post

Thanks for the great post. I just picked up a Droid and am anxious to see OpenGL ES 2.0 supported on it soon. By the way, you are correct that ATITC and PVRTC are not compatible.

You're welcome!

You're welcome!

You can use the SD card, you

You can use the SD card, you just have to have your game download additional content to it after the initial install. I think it makes sense for additional game data like expansion packs, new music, levels, etc.. Perhaps you could just have the game engine install and have that download all of the loadable game data to the SD. That would make it so that you could have as much as you want - provided it's a good game. People won't be willing to go through that installation process for anything but a really great game.

Good Overview of the new phone

I'm looking at porting a number of my games to Android, so this is a very timely post for me. Thanks for putting it together.

I wish we would have more

I wish we would have more room to store the apps on the handset. What I read is that you still don't have more than 200MB free for app storage. This will make bigger games impossible. Maybe there's a way to store all the data on the sd card.

The screen resolution is

The screen resolution is 854x480. I believe you are correct - it is probably having my game run in 569x320 as a compatibility thing. I'll update the manifest to 2.0 and try running it in high-res.

Screen resolution

I'm surprised by the screen resolution. All the specs I've seen say that the device has a 854x480 screen. Have you updated your app manifest for high DPI screens? If not, I suspect that the 569x320 resolution is from the compatibility mode.