#include #include #include extern "C" { #include "deps/libpng/png.h" } #include "types.h" #include "deps/libzip/zip.h" #define TEXTURE_LOAD_ERROR 0 //Taken from http://en.wikibooks.org/wiki/OpenGL_Programming/Intermediate/Textures /** loadTexture * loads a png file into an opengl texture object, using cstdio , libpng, and opengl. * * \param filename : the png file to be loaded * \param width : width of png, to be updated as a side effect of this function * \param height : height of png, to be updated as a side effect of this function * * \return GLuint : an opengl texture id. Will be 0 if there is a major error, * should be validated by the client of this function. * */ zip_file* file; zip* APKArchive; void setAPK (const char* apkPath) { LOGI("Loading APK %s", apkPath); APKArchive = zip_open(apkPath, 0, NULL); if (APKArchive == NULL) { LOGE("Error loading APK"); return; } //Just for debug, print APK contents int numFiles = zip_get_num_files(APKArchive); for (int i=0; i