Displaying graphics with EGL
Besides the GLSurfaceView
display mechanism we
described in the previous recipe, it is also possible to display OpenGL graphics using EGL.
Getting ready
Readers are recommended to read the Drawing 3D Graphics and Lighting up the Scene with OpenGL ES 1.x API recipe before going through this one.
How to do it...
The following steps describe how to create an Android project that demonstrates the usage of EGL:
- Create an Android application named
EGLDemo
. Set the package name ascookbook.chapter4.egl
. Please refer to the Loading native libraries and registering native methods recipe in Chapter 2, Java Native Interface, if you want more detailed instructions. - Right-click on the project
EGLDemo
, select Android Tools | Add Native ...
Get Android Native Development Kit Cookbook now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.