April 2015
Beginner to intermediate
494 pages
10h 26m
English
Now that libpng is compiled, let's read a real PNG file with it:
jni/GraphicsManager.hpp and include the Resource header file.Create a new structure named TextureProperties containing:
... #include "Resource.hpp" #include "Types.hpp" ... struct TextureProperties { Resource* textureResource; GLuint texture; int32_t width; int32_t height; }; ...
loadTexture() to the GraphicsManager to read a PNG and load it into an OpenGL texture.Textures are saved in an mTextures array to cache and finalize them.
... class GraphicsManager { public: ... status start(); void stop(); status update(); ...