Making an Android app. Whenever I set GL10.GL_TEXTURE_MIN_FILTER to GL_LINEAR_MIPMAP_NEAREST and GL_TEXTURE_MAG_FILTER to GL_LINEAR my textures disappear and only a white cube is generated in it’s place. Same if I don’t set them and use the default values. But if both are either GL_LINEAR or GL_NEAREST (or a combination of the two) it works fine.
This is my code…any advice? Below works, but not if I change GL10.GL_TEXTURE_MIN_FILTER to GL_LINEAR_MIPMAP_NEAREST. (Note: I tried both methods shown below of loading the bitmap with the same results)
You should not use NEAREST because you think it will help in performance. Most, if not all, rendering hardware is designed around LINEAR filtering, so using NEAREST will generally buy you nothing. You should use NEAREST because you want what it provides in terms of texture sampling (ie: exact texel values with no blending between neighboring texels).
it’s not you should not or should. that depends on the goal you will precess. different algorithm results in different effect. texture mapping is a complex work, need differnt ways to do. then you can get a perfect effect.