android - texture mapping -


i'm trying apply texture sprite using opengl follows:

int[] textures=new int[1]; gl.glenableclientstate(gl10.gl_texture_2d); gl.glgentextures(1, textures, 0); gl.glbindtexture(gl10.gl_texture_2d, textures[0]); 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_linear); bitmap bitmap=null; try {    bitmap=  bitmapfactory.decodestream(contxt.getassets().open("gfx/garf.png")); } catch (ioexception e) { // todo auto-generated catch block e.printstacktrace(); }  glutils.teximage2d(gl10.gl_vertex_array, 0, bitmap, 0); bitmap.recycle(); 

.....

i'm using andengine framework in android , using onmanageddraw method of sprite this.

can in direction?

i think need teximage2d(gl10.gl_texture_2d, 0, bitmap, 0);


Comments

Popular posts from this blog

c# - How to set Z index when using WPF DrawingContext? -

razor - Is this a bug in WebMatrix PageData? -

visual c++ - Using relative values in array sorting ( asm ) -