Saturday, December 8, 2007

Colored Triangles Demo

This demo renders several different copies of the same triangle into the world -- all with different colors. In this demo, you can learn how to render multiple instances of the same object without creating the same vertex list over and over. Also, you can learn how to use HLSL to transform all vertices to homogeneous clip space in the vertex shader, and take a color parameter from the application to use in the pixel shader.