dhpoware logo
home products source demos contact us
navbar navbar
box top left corner box top right corner
OpenGL 3 Per-Fragment Spotlight Lighting Demo.

This Windows application demonstrates how to implement the Phong lighting model for a single spotlight light source using OpenGL 3 or a forward compatible OpenGL 3.0 rendering context. The shaders can be extended to support multiple spotlight light sources.

Press UP to move the spotlight light source closer to the cube.
Press DOWN to move the spotlight light source away from the cube.
Press ALT and ENTER to toggle between windowed mode and full screen mode.
Press the SPACE BAR to pause the spinning cube.

1. This is an OpenGL 3 demo. This demo will not run on OpenGL 2.x and OpenGL 1.x hardware.
2. This demo requires the Visual C++ 2010 Library Runtimes. Download instructions can be found here.

screen shot

zip file Download executable, source, and Visual C++ 2010 solution files.

Change History:

10 July 2010.
Added missing .vcxproj.filters file to the project.

13 June 2010.
Updated solution to Microsoft Visual Studio 2010.

box bottom left corner content box box bottom right corner
logo logo