The terrain is generated using triangle strips. Data from the height map is averaged depending on the user selected resolution and the terrain is drawn strip by strip. Normals are also calculated at each vertex for lighting.
There are two textures used in the program. There is a dirt texture for the land and a water texture for the ocean. The water texture is more interesting. I applied transparency to the water so that land below sea level can be seen through the water. Additionally, the water texture is animated by shifting the variables in glTexCoord2f() to create a moving water effect. This is really cool and you'll have to run the program to see it.
This program can be slow if the resolution is set too high. To speed things up a bit, a display list is created for the terrain. The user can change the resolution as well. Below are images comparing two different resolutions in shaded and wireframe mode:
Low resolution:
Higher resolution: