Red Book Examples

From SDL.NET

The Red Book Examples are a series of examples from the OpenGL Official Prgramming Guide (the Red Book). SDL.NET provides implementations of all of the Red Book examples by using a number of assemblies from the Tao Framework including Tao.OpenGl and Tao.FreeGlut.

Red Book Example: AAIndex - AA Lines in Color Index Mode

RedBook AAIndex Screenshot
Enlarge
RedBook AAIndex Screenshot

This program draws shows how to draw anti-aliased lines in color index mode. It draws two diagonal lines to form an X; when 'r' is typed in the window, the lines are rotated in opposite directions. The source code is here (http://cs-sdl.svn.sourceforge.net/viewcvs.cgi/cs-sdl/trunk/SdlDotNet/examples/SdlDotNetExamples/RedBook/RedBookAAIndex.cs?view=markup)

Red Book Example: AAPoly - Filled polygons

RedBook AAPoly Screenshot
Enlarge
RedBook AAPoly Screenshot

This program draws filled polygons with antialiased edges. The special GL_SRC_ALPHA_SATURATE blending function is used. Pressing the 't' key turns the antialiasing on and off. The source code is here (http://cs-sdl.svn.sourceforge.net/viewcvs.cgi/cs-sdl/trunk/SdlDotNet/examples/SdlDotNetExamples/RedBook/RedBookAAPoly.cs?view=markup)

See Also