开发者

Android Textures appear unclear/fuzzy

开发者 https://www.devze.com 2023-01-20 13:54 出处:网络
I\'m having trouble making my texture rendered correctly in my applications. 开发者_运维知识库the artwork I use is precise and already scaled and the right size but when I render it on phone suddenly

I'm having trouble making my texture rendered correctly in my applications. 开发者_运维知识库the artwork I use is precise and already scaled and the right size but when I render it on phone suddenly my texture are not as clear/precise as the original artwork and I can't figure out why.

has anybody had this issue before?


This is because android will compress all resources that are not placed inside /res/raw/

http://developer.android.com/guide/topics/graphics/2d-graphics.html

Note: Image resources placed in res/drawable/ may be automatically optimized with lossless image compression by the aapt tool. For example, a true-color PNG that does not require more than 256 colors may be converted to an 8-bit PNG with a color palette. This will result in an image of equal quality but which requires less memory. So be aware that the image binaries placed in this directory can change during the build. If you plan on reading an image as a bit stream in order to convert it to a bitmap, put your images in the res/raw/ folder instead, where they will not be optimized.


This might also happen if you use linear filtering in your texture, make sure that texture filters are GL_NEAREST for GL_MIN_FILTER and GL_MAG_FILTER.


Ok I finally figured it out

the problem I was having was coming from the default compatibility mode of android

I had to add this to my manifest

0

精彩评论

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