| OpenGL 3.1 Context Creation Demo.
This Windows OpenGL application shows you how to create an OpenGL 3.1 rendering context. In order to maintain backwards compatibility an OpenGL 3.1 rendering context must be explicitly created using the new WGL_ARB_create_context extension. Using the existing OpenGL context creation functionality will return an OpenGL 2.1 or older rendering context.
In this demo we create a forward compatible OpenGL 3.1 rendering context. Forward compatible rendering contexts are defined for OpenGL 3.0 or later. They must not support functionality marked as deprecated by that version of the API, while a non forward compatible context must support all functionality in that version, deprecated or not.
Note:
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.

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.
30 March 2009.
main.cpp: Updated InitGL() function to create a forward compatible OpenGL 3.1 rendering context. The context creation logic will fall back to OpenGL 3.0 if a 3.1 context is not available. |