Android graphics --- OpenGL (2)

Source: Internet
Author: User

OpenGL package

Once GLSurfaceView and GLSurfaceView. Renderer class are used to create a View container for OpenGL, the following classes can be used to call OpenGL APIs:

1. OpenGL ES 1.0/1.1 API package

Android. opengl ------ this package provides a static interface for OpenGL ES 1.0/1.1 and has better performance than the javax. microedition. khronos package interface.

GLES10 (http://developer.android.com/reference/android/opengl/GLES10.html)

GLES10Ext (http://developer.android.com/reference/android/opengl/GLES10Ext.html)

GLES11 (http://developer.android.com/reference/android/opengl/GLES11.html)

GLES10Ext (http://developer.android.com/reference/android/opengl/GLES10Ext.html)

Javax. microedition. khronos. opengles ------ this package provides the standard implementation of OpenGL ES 1.0/1.1

Http://developer.android.com/reference/javax/microedition/khronos/opengles/GL10.html (GL10)

GL10Ext (http://developer.android.com/reference/javax/microedition/khronos/opengles/GL10Ext.html)

GL11 (http://developer.android.com/reference/javax/microedition/khronos/opengles/GL11.html)

GL11Ext (http://developer.android.com/reference/javax/microedition/khronos/opengles/GL11Ext.html)

GL11ExtensionPack (http://developer.android.com/reference/javax/microedition/khronos/opengles/GL11ExtensionPack.html)

2. OpenGL ES 2.0 API class

Android. opengl. ELES20 ------ this package provides the OpenGL ES 2.0 interface, which is effective from Android2.2 (API Level 8.

To create an OpenGL-related application immediately, see OpenGL ES 1.0 or OpenGL ES 2.0 development guide.

OpenGL ES 1.0: http://developer.android.com/resources/tutorials/opengl/opengl-es10.html

OpenGL ES 2.0: http://developer.android.com/resources/tutorials/opengl/opengl-es20.html

Declare OpenGL requirements

If the OpenGL function used by the application is not valid on all devices, you must include these functional requirements in the AndroidManifest. xml file of the application.

Generally, the declaration of OpenGL list is as follows:

1. OpenGL ES version requirement-if the application only supports OpenGL ES 2.0, you must declare this requirement by adding the following settings to the list:

<! -- Tell the system this app requires OpenGL ES 2.0. -->
<Uses-feature android: glsversion = "0x00020000" android: required = "true"/>

After this declaration is added, Google Play restricts the application to be installed on devices that do not support OpenGL ES 2.0.

2. Texture compression requirements-if the application uses the texture compression format. You must use the <supports-gl-texture> element in the application's configuration file to declare the supported format. For more information about valid texture compression formats, see the "texture compression support" section"

Declaring texture compression in the Application List hides the application from devices that do not support the declared compression format (as long as one format is not supported ).

By FireOfStar
 

Related Article

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.