Correct way to use png/jpg in OpenGL ES
What is the correct way to save images in png format, if I want to use it in my Android OpenGL 开发者_StackOverflow中文版ES application as texture?
Somehow some textures work, and some texture get incorrect vertex mapping. The code is the same, the image is different.
That looks like you're loading the texture data the wrong way, a PNG can be 24-bit per pixel (RGB), or 32-bit per pixel (RGBA). If you don't consider this in the texture loading code, some textures will look like that.
精彩评论