How do I make a water effect view with openGLES on the iPhone?

I found this vid: I wonder if that's some kind of standard effect of openGLES. I'm pretty sure it is, since I have seen this pretty often. KoiPond uses it, DuckDuckDuck uses it. A lot of games use it. They're not all astronauts. They're normal programmers ;) So how is this done? Is there any tutorial for this on the web?


For an old example have a look at the 'distort' example. Note that this is a thing created back in 1992 (just looked in distort.c).

Awesome program that causes ripples in the image wherever the mouse button is pressed. Another mode of the program acts like a sheet of rubber and can be pulled by dragging the mouse.

I managed to compile the example on my mac.

  • Rename all #include <GL/glut.h> to #include <GLUT/glut.h>
  • Add a usleep(33*1000); in the idle() function
  • Rename the file ripple_precalc.c to (or just rm it)
  • Compile with "cc *.c -framework GLUT -framework OpenGL" will create an a.out

(off the top of my head) Maybe a mesh distortion where the texture is pinned to the vertices and hence appears to ripple as the mesh vertices are moved? By moving a set of vertex displacements around the mesh you could make a uniform ripple like a wavefront...

JeeBee has it right. You can base your code off this tutorial:

Need Your Help

Populate model with metadata of file uploaded through django admin

django file-upload django-models django-admin

I have two models,Foto and FotoMetadata. Foto just has one property called upload, that is an upload field. FotoMetadata has a few properties and should receive metadata from the foto uploaded at F...