Time for action – compiling and embedding libpng module
Let's load an OpenGL texture from a PNG file in DroidBlaster.
- Go to the website http://www.libpng.org/pub/png/libpng.html and download the
libpng
source package (which is Version 1.6.10 in this book).Note
The original
libpng
1.6.10 archive is provided with this book in theLibraries/libpng
folder.Create a folder named
libpng
inside$ANDROID_NDK/sources/
. Move all files from thelibpng
package into this.Copy the file
libpng/scripts/pnglibconf.h.prebuilt
into the root folderlibpng
with other source files. Rename it aspnglibconf.h
.Note
The folder
$ANDROID_NDK/sources
is a special folder considered as a module folder by default. It contains reusable libraries. See Chapter 9, Porting Existing Libraries ...
Get Android NDK Beginner's Guide - Second Edition 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.