Skip to content

Example code for the OpenGL 4.0 Shading Language Cookbook

Notifications You must be signed in to change notification settings

dangets/glslcookbook

 
 

Repository files navigation

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.

Requirements

To use these examples, you'll need the following:

Compiling the examples

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.

  1. Install GLFW by following the instructions on their web site.
  2. Install the latest version of GLM.
  3. Download the example code from github, or clone using git.
  4. Edit the Makefile to point to your GLFW and GLM installations.
  5. Compile by running make.

Any problems, create an issue on github.

Changes from the book

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:

  • Dropped dependence on Qt.
  • Uses GLFW, GLM, and GLLoadGen(optional).
  • Dropped dependence on libnoise for Chapter 8 examples. Instead, uses the noise functions available in GLM > 0.9.3.

About

Example code for the OpenGL 4.0 Shading Language Cookbook

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C++ 54.3%
  • C 36.4%
  • F# 6.9%
  • C# 1.3%
  • Gosu 1.1%