Basic Triangle
The triangle is the basic geometry that is used when rendering. All other shapes of geometry you want to draw must be divided into triangles.
The triangle parts:
- Face, the triangle itself, the area is what is gonna be rasterized (with normal fill mode at least).
- Face normal, the normal to the plane which the triangle is parallell too. It is mostly used for calculating the vertex normal.
- Vertex, a triangle has three vertices with x,y,z coordinates, they are located in the triangle corners. All transformations apply to these ones.
- Edge, the line between vertices are called edges, a triangle has three edges. Are used for example shadow volumes.
- Vertex normal, each vertex has a normal which decides the smoothness of the geometry.
Other data often used per vertex:
- Tangent and Binormal for per pixel lighting
- Texture coordinates (uvw-coords), sometimes more than one per vertex
Tutorial to render a triangle in DirectX10
http://msdn.microsoft.com/en-gb/library/bb172486(VS.85).aspx
Tutorial to render a triangle in OpenGL
http://60hz.csse.uwa.edu.au/workshop/workshop0/workshop1.html
Tutorial to render a triangle in XNA
http://www.riemers.net/eng/Tutorials/XNA/Csharp/Series1/The_first_triangle.php
Tutorial to render a triangle in OpenGL ES 2.0
http://www.webreference.com/programming/opengl_es/




