Time for action – loading a texture in OpenGL ES
PNG is a complex format to read. So let's embed libpng third-party library:
- Go to the libpng website at http://www.libpng.org/pub/png/libpng.html and download the libpng source package (version 1.5.2 in this book).
Original libpng 1.5.2 archive is provided with this book in
Chapter6/Resourcefolder under the name
lpng152.zip. A second archive
lpng152_ndk.zipwith the modifications made in the following steps is also available.
- Create a folder
$ANDROID_NDK/sources/. Move all files from the libpng package in it.
- Copy file
libpng/scripts/pnglibconf.h.prebuiltinto root folder
libpngwith other source files. Rename it
- Write an