ManualPerspective.vert in Tut 04
First thank you so much for writing this book. I finally feel like there is a book written about opengl that I can understand.
On to the issue...
In that vertex shader, and in the tutorial page, the camera position is defined as:
vec4 cameraPos = position + vec4(offset.x, offset.y, 0.0, 0.0);
then there is code that does the calculations to get the clip position. And after that we set w as:
clipPos.w = -cameraPos.z;
Since cameraPos.z has it's z to be 0.0 than this would cause division by zero when the "perspective divide" happens, no?
Running the shader "as is" results in a blank screen. But changing the definition of camera pos to: vec4(offset.x, offset.y, -2.0, 0.0); and then running the shader results in the expected image that is shown on the tutorial page.
I should point out though, that I'm on a mac and converting the tutorials to plain c and opengl 2.1 with ogl extensions since that's what supported on mac. But there does seem to be any screw ups with the code conversion as far as I can see.
Also may I suggest adding a way for people to contact you for general information? This bug tracker is great for reporting bugs, but some people may just want to say "thank you".
Again thank you for spending the time and writing this book.