Code Downloads & Errata

If you have purchased a Packt book and/or video, you can use this page to
  • Download the code or support files
  • View errata and amendments
  • Send us feedback

You selected

OpenGL 4.0 Shading Language Cookbook

David Wolff

Published 2011-07-26


Please register your e-mail address to download files. We will e-mail you with a direct link to the code download. If you have bought this book, you can login to your account and download the code files from your account page.

Before downloading the files please tell us where you purchased this book.


- 4 submitted: last submission 28 Sep 2016

Errata type: Typo | Page number: 17

The "How it works..." section mentions "an array named sourceArray". It should be "an array named codeArray".


Errata type: Code | Page number: 8 | Chapter : 1

The errata for issues with the way the shader files were loaded, and where shader data is read from file have been addressed in recent versions of the code at Example code for the OpenGL 4.0 Shading Language Cookbook.


On page 193 | Chapter 6 | Under section "Point Sprites with the geometry shader"

These coordinates run from 0 to 1 in each direction (left-to-right for s, bottom-to-top for t)

Should be -

These coordinates run from 0 to 1 in each direction (left-to-right for s, top-to-bottom for t)

Erata  type : code | Page number:  39

The variable "location" is defined as a GLuint, however the value returned is 
a signed integer as it returns -1 if the location could not be found

It Should be:

GLint instead of GLunit