Code used in class. The links below may point to out-of-date copies, use anonymous svn to retrieve the latest copies. Code is also available via anonymous svn from https://svn.ece.lsu.edu/svn/gp. Those not familiar with SVN should read these SVN instructions.
Demonstrates the most basic 3D techniques: how to project a triangle specified in object space onto a frame buffer. Draws one lonely (presumably) triangle.
Demonstrates how to apply 3D techniques to a list of possibly unrelated primitives (triangles). The routine draws a grid of identical triangles pierced by a unique one.
Demonstrates color interpolation and Z buffering. The routine draws a grid of triangles pierced by a triangle. The angle of the grid can be interactively adjusted.
Demonstrates simple lighting techniques. The routine draws a gold tube pierced by a triangle. There is a bright light in the tube that can dimmed, brightened, and moved around.
Texturing Examples. The code shows an undulating tube pierced by a purple quadrilateral. After turning on texturing the course syllabus will appear on the quadrilateral and tube. Filtering and texture mode can be changed using the UI.
Simple fragment shader example. A fragment shader is used to implement Phong shading. Also see the shader code.
| David M. Koppelman - koppel@ece.lsu.edu | Modified 18 Apr 2008 10:22 (1522 UTC) |