Example code from the OpenGL 4.0 Shading Language Cookbook
This is the example programs from the OpenGL 4.0 Shading Language Cookbook, by David Wolff. The source code has been updated to use GLFW, and no longer requires Qt.
To use these examples, you'll need the following:
- The GLM Mathematics Library.
- A recent version of the GLFW library.
All recipes have been tested on Linux. I hope to have them working on Windows (using MinGW) soon. Your help is welcome! Fork this project on github.
- Install GLFW by following the instructions on their web site.
- Install the latest version of GLM.
- Download the example code from github, or clone using git.
- Edit the
Makefile
to point to your GLFW and GLM installations. - Compile by running
make
.
Any problems, create an issue on github.
I've dropped Qt and moved to GLFW in order to make the code more easily portable. I've also moved over to gnu make.
Since the time of the book's writing, I have experienced problems with GLEW under a 4.x core profile. When doing some research it appears that there are some fundemental issues with GLEW and core profiles. Therefore, I've dropped the dependence on GLEW, and I'm using a pre-packaged header and loader that was created using the OpenGL Loader Generator.
The code has been fully tested with OpenGL 4.3 and compiles under Linux with the latest NVIDIA drivers, and will soon (hopefully) be tested with MinGW on Windows.
The major changes are listed below: