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/gpup. Those not familiar with SVN should read these SVN instructions.
Shows a ball boncing on a plane. Dynamic state is just the ball position and velocity.
Shows multiple balls connected by ideal springs.
Shows management of multiple balls.
A very simple OpenGL program. Just shows a purple traingle.
Code shows tesselation of a sphere.
Demonstrate different material properties (emissive, ambient, diffuse, specular) and lighting options.
Demonstrate use of vertex arrays and buffer objects, which are much faster ways of sending vertex data to OpenGL than using glVertex to send the data one vertex at a time. Also shows benefit of pre-computing coordinates.
Demonstration of texture application techniques and texture filtering techniques.
Demonstration of vertex and fragment shader for per-fragment lighting calculations. Also look at and the shader code.
This code, for use as a project base and in-class demo, shows multiple techniques. These include: ball physics performed by GPU via CUDA, use of shadow volumes to stencil shadow locations, use of vertex and geometry shader to compute ball reflection locations, use of occlusion queries to limit the number of balls rendered. See also CUDA code, and Shader code.
|David M. Koppelman - email@example.com||Modified 9 Oct 2012 16:45 (2145 UTC)|