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:
Example01 - Basic window and OpenGL 3 initialization
Example02 - Rendering of a triangle
Example02a - Grey filter
Example03 - Perspective rendering of a cube
Example04 - Phong rendering of a sphere
Example05 - Texturing of a cube
Example06 - Normal mapping
Example07 - Environment/cube mapping
Example08 - Particles
Example09 - Geometry Shader
Example10 - Reflection and Refraction
Example11 - Shadow mapping
Example12 - Simple tessellation (OpenGL 4)
Example13 - Terrain Rendering (OpenGL 4)
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!