Game Development Reference
In-Depth Information
Sony Xperia Z1
Sony Xperia Z Ultra
Sony Xperia Tablet Z
Note When this topic was written, Android SDK version 5.0.1 fully supported the OpenGL ES
version 3.1 used in this chapter.
If your application is exclusively for devices that support OpenGL ES 3.0/3.1, you can also
specify this in your manifest:
<!-- Tell the system this app requires OpenGL ES 3.1. -->
<uses-feature android:glEsVersion="0x00030001" android:required="true" />
To use the OpenGL ES 3.0/3.1, the application needs to link to the following library:
libGLESv2.lib
Here is the OpenGL ES 3.0/3.1 file needed by the application:
OpenGL ES 3.0/3.1 library:
#include <GLES3/gl3.h>
Let's see what we can now do with OpenGL ES version 3.1.
Superb Efficiency with OpenGL ES 3.1
This section covers the cutting edge in graphics development: OpenGL ES 3.1. It begins
with a brief description of the most important features OpenGL ES 3.1 can offer, including
shaders, GLSL, and how they affect the Android platform. Then we take a deeper look into
GLSL by creating a neat Android project to render an icosahedron using OpenGL ES 3.1.
Let's get started.
OpenGL ES 3.1 emphasizes a programmable 3D graphics pipeline that can create shader
and program objects and can write vertex and fragment shaders in the GLSL.
OpenGL ES 3.1 provides the following desirable qualities for current graphics programming:
A wider range of precision options for use in embedded devices using
shading language similar to the desktop OpenGL 2.0.
Framebuffer objects to simplify surface management and offer a subset
of functionality from the desktop FBO.
One hundred percent backward compatible with OpenGL ES 1.x and
built with the latest standards and most advanced ideas available for
graphics development.
 
Search WWH ::




Custom Search