Render a Terrain in OpenGL (part 1)

Part A


  1. Use OpenGL primitives to render a square mesh composed of triangles (see picture, showing triangles in wireframe mode). Your code should be flexible enough to allow for changes in the size of the mesh up to 100x100. The mesh should be centred on the origin and all points on the mesh should have a y-coordinate of zero.


  1. Allow the user to press a key to toggle between solid & wireframe mode (use the glPolygonMode function)
  2. In order to view the mesh, make sure your camera starts high on the y-axis looking at the origin

Part B


  1. Implement a free camera so that the user can view the mesh from any location/direction (see the camera control exercise)