Projects‎ > ‎

Water Demo

Reflective, wobbly water that doesn't use shaders.
Screenshots


Technical Details

Language:C
Libraries:
SDL, OpenGL, and DevIL
Platform:Cross-platform.
64-bit:
Yes

About

There isn't much to this one - the surface of the water is rendered as a grid of quads, with the texture coordinates slightly offset using a simple sin()/cos() operation at each vertex.

The reflection is done by inverting the model-view matrix along the Z-axis and re-rendering the scene, with the stencil buffer used to restrict the rendering to the water surface area.

An OpenGL clipping plane is used to prevent the reflected scene from being drawn above the water surface polygons.
SelectionFile type iconFile nameDescriptionSizeRevisionTimeUser
ċ

Download
Windows EXE and Source Code  896k v. 1 7 May 2011, 01:35 Go Busto
Comments