Part II β interactive, real-time data visualization with mobile GPUs
Now we will complete our demo with the native code implementation to create our highly interactive Android-based data visualization application with OpenGL ES 3.0 as well as the Android sensor and gesture control interface.
The following class diagram highlights what remains to be implemented on the C/C++ side:
How to do itβ¦
Here, we describe the implementation of the OpenGL ES 3.0 native code to complete the demo application. We will preserve the same code structure from Chapter 7, An Introduction to Real-time Graphics Rendering on a Mobile Platform using OpenGL ES 3.0. In the following steps, only the new codes are highlighted, and all changes are implemented in the main.cpp
file inside the jni
folder:
Include all necessary header files, including
JNI
, OpenGL ES 3.0, and theGLM
library:#define GLM_FORCE_RADIANS //header for JNI #include <jni.h> ... //header for GLM library #include <glm/glm.hpp> #include <...