Graphics Reference
In-Depth Information
Assuming you installed the PowerVR SDK to the default location, you
can set these variables to the
libEGL.so
and
libGLESv2.so
files, as
follows:
•
EGL_LIBRARY:
/opt/Imagination/PowerVR/GraphicsSDK/PVRVFrame/
EmulationLibs/Linux_x86_64/libEGL.so
•
OPENGLES3_LIBRARY:
/opt/Imagination/PowerVR/GraphicsSDK/PVRVFrame/
EmulationLibs/Linux_x86_64/libGLESv2.so
Now you can press “c” to configure and “g” to generate and exit ccmake.
The code is now ready to build; simply type the following:
~/src/opengles-book/build$ make
This should build
libCommon.a
along with all of the sample code. You are
now ready to run the
Hello_Triangle
sample:
build$ cd Chapter_2/Hello_Triangle
build$ ./Hello_Triangle
If you find that you are unable to run the program because the
libEGL.so
and
libGLESv2.so
are not found, set
LD_LIBRARY_PATH
to point to the
directory location as follows:
$ export
LD_LIBRARY_PATH=/opt/Imagination/PowerVR/GraphicsSDK/PVRVFrame/
EmulationLibs/Linux_x86_64/
Support for OpenGL ES 3.0 in Android 4.3 was announced in July 2013.
There are two ways of accessing OpenGL ES 3.0 on Android: either
through the Native Development Kit (NDK) using C/C++ or through
the Software Development Kit (SDK) using Java. We have provided the
sample code in both C and Java to support development with either
language. This section covers how to build and run the C Android 4.3
samples using the NDK. The next section covers how to build and run
the Java Android 4.3 samples using the SDK. OpenGL ES 3.0 has been
supported in the Android NDK starting with Android NDK r9. OpenGL
ES 3.0 is supported on Android devices supporting Android 4.3 (API
level 18) or greater.