Test whether Android G1 supports OpenGL hardware acceleration

Source: Internet
Author: User
Test whether Android G1 supports OpenGL hardware accelerationAuthor:Liu PengDate:This article uses the glgetstring () interface to print information such as Renderer, vendor, and version to determine whether G1 supports OpenGL hardware acceleration.
Introduction

I have been wondering whether OpenGL on T-Mobile G1 is implemented by software or hardware. I have checked it on the internet many times, but there are different opinions, some of which are software implementations, it is also known as hardware implementation. Inspired by glxinfo, This article uses the glgetstring interface for detection. The conclusion is that OpenGL of G1 mobile phones is implemented based on hardware.

Ideas

You can use the glgetstring interface to view information such as gl_renderer, gl_verdor, gl_version, and gl_extensions, especially gl_renderer, to determine whether it is a hardware implementation or software implementation.

The core code snippets are as follows:

        Log.d("GL", "GL_RENDERER = " + gl.glGetString(GL10.GL_RENDERER));        Log.d("GL", "GL_VENDOR = " + gl.glGetString(GL10.GL_VENDOR));        Log.d("GL", "GL_VERSION = " + gl.glGetString(GL10.GL_VERSION));        Log.i("GL", "GL_EXTENSIONS = " + gl.glGetString(GL10.GL_EXTENSIONS));

Use logcat to view debug information:

adb logcat
Data

Print Information of the test program running on the VM:

GL_RENDERER = Android PixelFlinger 1.0GL_VENDOR = AndroidGL_VERSION = OpenGL ES-CM 1.0GL_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

From gl_renderer information, we can see that OpenGL on the virtual machine is implemented by Android pixelflinger, that is, software implementation.

The print information of the test program running on the G1 mobile phone:

GL_RENDERER = Q3Dimension MSM7500 01.02.08 0 4.0.0GL_VENDOR = QUALCOMM, Inc.GL_VERSION = OpenGL ES 1.0-CMGL_EXTENSIONS =    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

From the gl_renderer information, we can see that the OpenGL of G1 is implemented based on the q3dimesion msm7500 chip, that is, hardware implementation and hardware acceleration.

Q3dimesion msm7500 glbenchmark Test details:

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.