On modern desktop hardware (GL3 / DX10), you can use conversion feedback to write the output of the vertex or geometry shader to the buffer, but I really doubt that the transform_feedback extension is supported on the iPhone (or in ES in general).
If PBOs are supported (which I also doubt), you can at least do this with some copies of the GPU-GPU. Just copy the vertex buffer into the texture (linking it like a PBO), then render the textured full-screen square and update in the fragment shader. After that, you copy the framebuffer (which now contains the updated vertex data) to the vertex buffer (again, binding it as a PBO). But in this way you need to make 2 copies (although both of them must be fully implemented on the GPU), and if the vertex data is a floating point, you will also need to support floating point rendering goals and framebuffer objects.
I think that in ES, the best solution would be to do computations on the processor. Just keep a copy of the processor (so you at least don't get an unnecessary GPU-CPU countdown) and update the buffer data every frame (using GL_DYNAMIC_DRAW or even GL_STREAM_DRAW as a buffer use).
Perhaps you can also completely prevent constant updates by making changes dependent on other simpler data. In your example, you can simply use the uniform for the frame number and set this as the coordinate in the vertex shader for each frame, but I donβt know how complicated your update function is.
source share