For every incoming tweet, I was asked to put a point (corresponding to tweet location) on world map (opengl scene). Some thing like this. I tried to learn OpenGL. I cried. With time, OpenGL started feeling like my friend. He was on the way to become my best friend. Now, I used GLSurfaceView
on Android and assumed like I can simply draw points one by one, one after another with out ever calling glCear()
. This way I only have to keep current tweet coordinate in memory. Told to myself, you are a genius. I suffered like others, whose have explained there pains here, here and here. Now comes a master, who taught me the basics and told me, kiddo, you have to call glClear
no matter what.
I cannot keep adding/storing coordinates of all points in memory and call glDrawArrarys
since this has to keep running for ever on mobile device. So the choices now are
- Draw
n
points. After that, try some thing like 'render to texture' and use that texture as background for the next drawing nextn
points. - Use
EGL_BUFFER_PRESERVED
as in EGL Preserve sample at Mali sdk . Needs NDK as AndroidEGL14
cannot be used before Android API 17. Khronos EGL11 is not yet implemented in Android. People closest to my new friend tells, he doesn't like this at all.
Do I have any other choices or am I solving the wrong problem ? I would like to know what is OpenGL's approach to updating a scene for ever.