I want to display a bitmap image at screen using texture api in android opengl. Some code which I have used in our code as below.
public void onSurfaceChanged(GL10 gl, int width, int height) {
gl.glGenTextures(1, texture, 0);
gl.glBindTexture(GL10.GL_TEXTURE_2D, texture[0]);
gl.glTexParameterf(GL10.GL_TEXTURE_2D, GL10.GL_TEXTURE_MAG_FILTER, GL10.GL_NEAREST);
gl.glTexParameterf(GL10.GL_TEXTURE_2D, GL10.GL_TEXTURE_MIN_FILTER, GL10.GL_NEAREST);
Bitmap bmp = BitmapFactory.decodeResource(ContextController.getContext().getResources(), R.drawable.ic_launcher);
GLUtils.texImage2D(GL10.GL_TEXTURE_2D, 0, bmp, 0);
bmp.recycle();
}
I have use this code But image is not display, screen is display as blank.