OpenGL 3 and 4 with GLSL

 
 
OpenGL.org OpenGL 3 and 4 with GLSL is available but there is a lack of simple and complex example programs. On this webpage, we do want to fill this gap by providing example programs using OpenGL 3 and 4 with GLSL. The examples itself are platform independent by using GLUS, a helper library included in the project. Please note, that all example programs do not use any deprecated OpenGL functions.

Source Code (Visual C++ 2008, Mac OS X Make and Linux Make Project Files):


Do you like the examples? If yes, please recommend this site on Facebook:



Example 01 Example01 - Basic window and OpenGL 3 initialization
Example 02 Example02 - Rendering of a triangle
Example 02a Example02a - Grey filter
Example 03 Example03 - Perspective rendering of a cube
Example 04 Example04 - Phong rendering of a sphere
Example 05 Example05 - Texturing of a cube
Example 06 Example06 - Normal mapping
Example 07 Example07 - Environment/cube mapping
Example 08 Example08 - Particles
Example 09 Example09 - Geometry Shader
Example 10 Example10 - Reflection and Refraction
Example 11 Example11 - Shadow mapping
Example 12 Example12 - Simple tessellation (OpenGL 4)
Example 13 Example13 - Terrain Rendering (OpenGL 4)
Example 14 Example14 - Water (OpenGL 4)

Tested platforms:

  • Windows 7 SP1 (32bit) and Linux Ubuntu 10.10 (32bit) with an ATI Radeon HD 5850 (Catalyst 11.12)
  • Mac OS X 10.7 (64bit) with an ATI Radeon HD 6750M (Latest updates installed)

Thanks a lot to Pablo Alonso-Villaverde Roza and Alexandr Palamar for testing and helping to make the Linux version happen!