OpenGL Demos and Tests

Watch some of them on my YouTube channel!

GL_blit

Another demo for the Mars series of SDL examples, this, actually, uses SDL just to handle an OpenGL rendering context. It's an exhaustive test about blitting in 2 dimensions that should be useful to a lot of programmers.
System: Linux/Win
Language: C
Libraries: SDL, OpenGL
Compiler: GCC 3.4.3
Version: 1.0
Date: 1 Apr 2005
Download: tar.gz
State: Completed

GL_pointz

This is a little and simple demo made just to have some fun with OpenGL. I wanted to do something and to have it completed in just an afternoon. It was inspired from many old skool demos showing 3d starfields or geometric shapes made of points, of course it was a lot harder, back in the assembly days, to have them wave and rotate on the screen.
System: Linux/Win
Language: C
Libraries: SDL, OpenGL
Compiler: GCC 3.4.3
Version: 1.0
Date: 20 May 2005
Download: tar.gz
State: Completed

GLSL_pointz

This is just the remake of the previous demo using shaders via OpenGL Shading Language.
Have a look at it running real fast even under heavy CPU load. :)
The grab showing the program running is the same as the previous demo, they actually display the same effect.
System: Linux/Win
Language: C, GLSL
Libraries: SDL, OpenGL
Compiler: GCC 3.4.3
Version: 1.0
Date: 31 May 2005
Download: tar.gz
State: Completed

Cg_pointz

Another version of the original pointz demo, this time making use of nVidia's Cg here.
The grab showing the program running is the same as the original demo, they actually display the same effect.
System: Linux/Win
Language: C, Cg
Libraries: SDL, OpenGL
Compiler: GCC 3.4.3, Cg 1.3
Version: 1.0
Date: 3 Jun 2005
Download: tar.gz
State: Completed

ARB_pointz

The last modification of the original pointz demo, it makes use of ARB vertex and fragment programs.
Again, the grab showing the program running is the same as the original demo, they display the same effect.
System: Linux/Win
Language: C, shaders asm
Libraries: SDL, OpenGL
Compiler: GCC 3.4.3
Version: 1.0
Date: 6 Jun 2005
Download: tar.gz
State: Completed

GL_smoke

An experiment with particles based on the 19th chapter of NeHe tutorials led me to this simple, yet fascinating, smoke demo.
System: Linux/Win
Language: C
Libraries: SDL, OpenGL
Compiler: GCC 4.0.3
Version: 1.0
Date: 1 Dec 2005
Update: 8 Dec 2005
Download: tar.gz
State: Completed

GL_shadow

A great demo about real-time shadows generation with stencil shadow volumes!
It's based on NeHe's lesson 27.
System: Linux/Win
Language: C
Libraries: SDL, OpenGL
Compiler: GCC 4.0.3
Version: 1.0
Date: 31 Dec 2005
Download: tar.gz
State: Completed

GLSL_parallax

Another rather serious demo, it heavily depends on GLSL shaders and OpenGL 2.
You can see a VBOs rendered cube showing per pixel Blinn-Phong shading with specular mapping and tangent space parallax mapping with offset limiting!
System: Linux/Win
Language: C, GLSL
Libraries: SDL, OpenGL 2
Compiler: GCC 4.1.2
Version: 1.0
Date: 01 May 2007
Download: tar.gz
State: Completed

AL_test

This is my first attempt with OpenAL, a standard library for positional audio and effects, which has an API similar to OpenGL.
The program uses SDL, as usual, and OpenGL itself for listener and source positions representation.
System: Linux/Win
Language: C
Libraries: SDL, OpenGL, OpenAL, ALUT
Compiler: GCC 4.2.3
Version: 1.0
Date: 15 Feb 2008
Download: tar.gz
State: Completed

GLSL_imgpro

A demo to test about post-processing with shaders and Frame Buffer Objects.
It applies a 3x3 convolution matrix to every pixel of the FBO, which contains the rendered scene to process.
Current applicable filters include sharpen, blur, gaussian blur, edge enhance, edge detect and emboss.
System: Linux/Win
Language: C, GLSL
Libraries: SDL, OpenGL 2
Compiler: GCC 4.2.3
Version: 1.0
Date: 12 Mar 2008
Download: tar.gz
State: Completed

GLSL_DoF

After having tested basic post-processing techniques with the previous demo, I come now with a first real application.
This demo is my adaptation of the first D3D example code from the ShaderX2 chapter titled "Real-Time Depth of Field Simulation".
System: Linux/Win
Language: C, GLSL
Libraries: SDL, OpenGL 2
Compiler: GCC 4.2.3
Version: 1.0
Date: 23 Mar 2008
Download: tar.gz
State: Completed

GLSL_DoF2

This demo is my adaptation of the second D3D example code from the ShaderX2 chapter titled "Real-Time Depth of Field Simulation".
It is 2.5 times faster and shows less artifacts and problems than the first one.
System: Linux/Win
Language: C, GLSL
Libraries: SDL, OpenGL 2
Compiler: GCC 4.3.0
Version: 1.0
Date: 15 Apr 2008
Download: tar.gz
State: Completed

GLSL_multilight

This demo shows a bunch of rotating and textured cubes in a cubic room lit in different ways:
  1. using the fixed pipeline (single and multi-pass)
  2. using shaders (single and multi-pass, per-vertex and per-pixel)
  3. through deferred shading
System: Linux/Win
Language: C, GLSL
Libraries: SDL, OpenGL 2
Compiler: GCC 4.3.0
Version: 1.0
Date: 28 Apr 2008
Download: tar.gz
State: Completed

PyGLSL_framework

This is the first revision of a tiny and simple PyOpenGL3 class library for demos.
It comes with the Python version of two C demos I developed: GLSL_DoF2 and GLSL_multilight.
System: Linux/Win
Language: Python, GLSL
Libraries: PyGame, PyOpenGL 3
Interpreter: Python 2.5.1
Version: 1.0
Date: 28 Apr 2008
Download: tar.gz
State: Completed

GL3_parallax_DoF

This demo is the first one using a C++ class library, it shows parallax mapping and depth of field together.
The classes are very close to be GL3 (and ES2) compliant, this actually means that I don't use the fixed pipeline at all: I handle matrices by myself and pass every information to shaders directly, with no use of OpenGL built-in state variables.
Stanford PLY mesh loading comes as a little bonus. ;-)
System: Linux/Win
Language: C++, GLSL
Libraries: SDL, OpenGL 2
Compiler: GCC 4.3.2
Version: 1.0
Date: 10 Nov 2008
Download: tar.gz
State: Completed

GLSL_toon

This was a quick made demo that I wrote because I felt like I was the only one who didn't write a toon shader yet. ;-)
It works by filtering the eye-space normal buffer previously saved in a texture using MRTs then converted in grey shades.
System: Linux/Win
Language: C++, GLSL
Libraries: SDL, OpenGL 2
Compiler: GCC 4.3.3
Version: 1.0
Date: 26 Apr 2009
Download: tar.gz
State: Completed

GLSL_hdrload

These two HDR related demo were built during my internship activity and included in my BSc thesis.
The first one is an implementation of the High Dynamic Range Rendering article published on GameDev.net while the second one is based on the High Dynamic Range Rendering in XNA article published on Ziggyware.
System: Linux/Win
Language: C++, GLSL
Libraries: SDL, OpenGL 2
Compiler: GCC 4.4.1
Version: 1.0
Date: 14 Jan 2009
Release Date: 14 Oct 2009
Download: tar.gz
State: Completed

GLSL_water

While studying other techniques I put everything in standby to work to this demo full-time for some days.
This is based on Riemer's XNA Water Technique, it's not optimized in any way and very lazy in scene handling but it works. :-)
System: Linux/Win
Language: C++, GLSL
Libraries: SDL, OpenGL 2
Compiler: GCC 4.4.2
Version: 1.0
Date: 02 Nov 2009
Download: tar.gz
State: Completed

GLSL_deferred

This is my second attempt with deferred shading, it uses cubes for point light volumes and pyramids for spot ones.
It also features iterative parallax mapping, screen space ambient occlusion and depth of field.
The statue model is the famous Stanford Lucy.
System: Linux/Win
Language: C++, GLSL
Libraries: SDL, OpenGL 2
Compiler: GCC 4.5.0
Version: 1.0
Date: 01 Jun 2010
Download: tar.gz
State: Completed

ViM edited ©2002-2009 Angelo Theodorou