O'Reilly logo

Android NDK Beginner's Guide by Sylvain Ratabouil

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Time for action – loading a texture in OpenGL ES

PNG is a complex format to read. So let's embed libpng third-party library:

  1. 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).

    Note

    Original libpng 1.5.2 archive is provided with this book in Chapter6/Resource folder under the name lpng152.zip. A second archive lpng152_ndk.zip with the modifications made in the following steps is also available.

  2. Create a folder libpng inside $ANDROID_NDK/sources/. Move all files from the libpng package in it.
  3. Copy file libpng/scripts/pnglibconf.h.prebuilt into root folder libpng with other source files. Rename it pnglibconf.h.
  4. Write an Android.mk file inside $ANDROID_NDK/sources with ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required