Android NDK Beginner's Guide Second Edition by Second Edition

Android NDK Beginner's Guide Second Edition by Second Edition

Author:Second Edition
Language: eng
Format: mobi
Publisher: Packt Publishing


The PNG files are provided with this book in the DroidBlaster_Part6/assets directory.

What just happened?

Run the application and you should not see much difference. Indeed, we have loaded two PNG textures, but we are not actually rendering them. However, if you check the logs, you should see traces showing that the textures are properly loaded and retrieved from the cache, as shown in the following screenshot:

Textures in OpenGL are objects (in the OpenGL way) which are in the form of an array of memory allocated on the Graphical Processing Unit (GPU) to store specific data. Storing graphics data in the GPU memory provides faster memory access than if it was stored in the main memory, which is a bit like a cache on a CPU. This efficiency comes at a price: texture loading is costly and must be performed as much as possible during startup.



Download



Copyright Disclaimer:
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.