I am drawing points using “gl.glDrawArrays(gl.GL_POINTS, …..) on touch move event. I am not using NDK, I am trying this with GLSurfaceView and GL10 context with RENDERMODE_WHEN_DIRTY mode.
My application is working fine on Galaxy S, but when I am checking this app on Motorola XOOM, it looks like along with current touch points previously drawn points are also getting drawn, due to which display is not smooth, it flickers on touch move.
I want to retain previously drawn points and let application should draw current fresh points which is happening on other devices.
Is there any way I can retain previously points? Any pointer for setting EGL configurration/context related to this will be appreciated.
OpenGL does its rendering in immediate mode, what this means is that after a frame has been rendered, the next draw event will have no knowledge of what was rendered before and it will overwrite it. There are tricks around it, like storing the previously rendered buffer and redraw it along with the new one, but for what you are asking why can’t you just store the touch points into an array and draw all them every frame?