OpenGL Project on water ripple effects

Rajeev









Description: The project is to simulate the water ripple effects. It used the OpenGL buffer technique.
It used 2 arrays of words. These arrays will hold the state of the water. One holds the current state, the other holds the state from the previous frame. It is important that to have 2 arrays, since it need to know how the water has changed since the last frame, and the frame before that.
The height of the wave two frames is proportional to the size of the arrows. So as long as the previous two frames are remembered, it is easy to work out the change in height of every part of the wave.
So, take a look at the code again. When the loop starts, Buffer1 contains the state of the water from the previous frame and Buffer2 has the state before that . Buffer2 therefore has information about the vertical velocity of the wave.

USAGES:  Space-bar : To drops the ripples of water for effect.
                 m: Exit full screen mode
                 f: Full screen mode.
                 x: Exit program.

Project Code: Download

10 comments

  1. Pranav mishra
     We can create the water ripple effect using the HTML5 Canvas, you can find the tutorial here   http://tinyurl.com/3z5j2r7
  2. guest
    Hey i m n ot able to download the code...its copyright protected it seems..:(
  3. Abinande
    give your id will mail d code....
  4. Kamalkishore59
    This one of the fine project i seen.....thanks for uploading
  5. shalini
    please send me the code.plz,plz
  6. Leo Karti
    how to run this project in code blocks please reply
  7. harsh
    can u please explain this code in more detail.i mean with comments
  8. Rajeev Kumar Singh
    what yu didn't get post i will tell u about it.......
  9. Rajeev Kumar Singh
    as u do with the normal code in there
  10. Bhuvana
    Can i find an explanation for the functions used please!

Join the conversation