Wethern's Law: Assumption is the mother of all screw-ups Concept 5.2 : A simple Triangulation Example ============================================= Idea: ===== Shown to your left is a annulus. The lazy mans way of rendering this scene would be to first draw a big white square the size of the outer perimeter and then a small black squre inside it!! Obviously we are here to learn to do things the correct way using triangulation. KeyBoard Options ================ The following keyboard options work: 'w' toggles between wireframe and solid polygon mode 'e' toggles between rendering the internal edges of the triangles and rendering only the extermities of the triangles which make up the annulus Do the following : ================== click 'w' anywhere in the rendering area. This shows you the annulus in a wireframe mode. Notice how the object has been triangulated. Also the code window above shows that the triangles are rendered in a consistent CCW fashion. The triangle vertices have been selected such as to form two equal triangles per side of the annulus. While in the wireframe mode click the 'e' button on the keyboard. Notice how the inside edges of the triangle vanish. When you click 'e' the internal edges are suppressed by issuing the command glEdgeFlags(FALSE); Points to Remember: =================== o Generate small but equal sized triangles o Remember to orient your triangles while rendering them so they are rendered the same way. i.e. CCW or CW i.e. Counter Clock Wise vertex specification or Clock Wise vertex specification. o Make use of glEdgeFlag() with the argument set to FALSE if you wish to render inside edges invisible.