Reputation: 327
How do you texture a cube with png image in OpenGL ES 2.0? And how do you use atlas for the texturing?
Upvotes: 1
Views: 2502
Reputation: 15726
For the good old cube demo, check this out.
The code is written in WebGL, but you can easily convert it.
However, if you have trouble converting it, then I suggest you start with the "Hello Triangle" demo first -- to get used to this.
There are two links.
To do the PNG part, you have a few options depending on your platform (Android, Palm, iPhone)
To give you at least one answer, if you are coding in C++, then you can use libPNG and that also requires zlib. There are many sites with the code to load a PNG into a Texture using C++. For instance.
Good luck!
Upvotes: 1