开发者

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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜