views:

29

answers:

3

Hi all

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?

+1  A: 

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.

madsleejensen
Thats an interesting suggestion, I'll dig into because I might be loosing some quality there too. Thanks for the idea
A: 

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.

Matias Valdenegro
Thank for the suggestion but I'ave already tweaked those parameters but it didn't solve the problem I had.
A: 

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