How do you texture a cube with png image in OpenGL ES 2.0? And how do you use atlas for the texturing?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
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!