OpenGL ES software hierarchical stack. This chapter introduces the calling hierarchical stack of OpenGL ES in Android systems, and analyzes in detail how to implement API call association between libraries through hooks, let us understand the dependencies between libraries. This section describes OpenGL ES in Android. Introduction to OpenGL ES in Android supports the use of OpenGL (Open Graphics Library) API to draw 2D and 3D Graphics, especially the use of OpenGL ES (Embedded System) API. OpenGL is a cross-platform graphics API specification that defines a set of standard software interfaces for 3D graphics processing hardware. OpenGL ES is a set of API specifications customized for embedded devices based on OpenGL APIs. Android 1.0 has supported OpenGL ES 1.0 and 1.1 since earlier versions, and Android 2.2 has supported OpenGL ES 2.0. The OpenGL es api provided by Android is similar to the j2jsr239 standard, but different. We can use OpenGL either through the API provided in the Android Framework or through the Native Development Kit (NDK) API. Developers can use two basic classes GLSurfaceView and GLSurfaceView in the Framework. Renderer draws images in Android applications, that is, using OpenGL APIs in Renderer to draw images on GLSurfaceView. For details about how to use them, see the official documentation ,. The following OpenGL es api packages can be used to draw images using GLSurfaceView and GLSurfaceView. Renderer. (1) The javax. microedition. khronos. opengles package provides OpenGL ES 1.0/1.1 Standard Implementation. APIs that can be used include GL10, GL10Ext, GL11, GL11Ext, and GL11ExtensionPack. (2) The package android. opengl provides a set of static function interfaces, including OpenGL ES 1.0/1.1 and 2.0. Its performance is superior to the package javax. microedition. khronos. opengles. Classes that support OpenGL ES 1.0/1.1 include: GLES10, GLES10Ext, GLES11, and GLES10Ext. APIs that support OpenGL ES 2.0 are android. opengl. GLES20 (since Android 2.2 ). Because Android supports OpenGL ES 1.0, 1.1, and 2.0, there is a significant difference between them. Which version should be selected? The "Choosing an OpenGL API Version" section in the Google document referenced in this section lists four factors, as described below. (1) Performance: Generally, OpenGL ES 2.0 provides faster performance than ES 1.0/1.1. However, this ultimately depends on Android devices, and the implementation of OpenGL on different device platforms is different. (2) device compatibility: the Android device type must be considered for applications developed by developers. Different Android versions support different OpenGL versions. For example, OpenGL ES 2.0 is only supported since Android 2.2. (3) Convenience of coding: OpenGL ES 1.0/1.1 API programming is more convenient, and Version 2.0 is more complex. (4) graphic control: By using shaders, OpenGL ES 2.0 provides more control over graphic rendering and can create better effects, which is hard to achieve in version 1.0/1.1.