Sunday, 15 July 2012

android - Textures get blurred when zoomed in Opengl ES 10. How do I fix it? -



android - Textures get blurred when zoomed in Opengl ES 10. How do I fix it? -

i've been trying draw bitmap, reading file onto canvas using opengl es 1.0. when zooming in using gltranslatef(), image tends blurred. i've looked day, couldn't solve issue.

things i've tried :

gl.gltexparameterf(gl10.gl_texture_2d, gl10.gl_texture_min_filter, gl10.gl_nearest); gl.gltexparameterf(gl10.gl_texture_2d, gl10.gl_texture_mag_filter, gl10.gl_nearest); gl.gltexparameterf(gl10.gl_texture_2d, gl10.gl_texture_wrap_s, gl10.gl_nearest); gl.gltexparameterf(gl10.gl_texture_2d, gl10.gl_texture_wrap_t, gl10.gl_nearest); gl.glhint(gl10.gl_perspective_correction_hint, gl10.gl_nicest);

adjusting near , far planes :

glu.gluperspective(gl, 45.0f, (float) width / (float) height, 0.1f, 1000.0f);

nothing, seems help. want image zoom uniformly without quality loss.

gl_nicest has never been valid value gl_texture_(min|max)_filter or gl_texture_wrap_(s|t).

you're looking gl_linear_mipmap_linear (if provide mipmaps, gl_linear if don't) , gl_linear gl_texture_min_filter , gl_texture_max_filter , gl_clamp_to_edge or gl_repeat gl_texture_wrap_(s|t).

android image opengl-es blur

No comments:

Post a Comment