PDA

View Full Version : OpenGL Superbible 5th edition example woes



SteveBuscemi
08-22-2010, 04:25 AM
I recently picked up the latest OpenGL superbible (fifth edition) hoping to learn the OpenGL 3 core profile.

Everything was smooth sailing until I hit chapter 7, and from there on many of the examples fail to run correctly (I've tried both building from the supplied source as well as the bundled binary). I can't seem to find an updated set of the examples either, I've tried the bundle at http://www.starstonesoftware.com/OpenGL/ as well as the supplied code from subversion.

The following examples fail to display anything, just a black canvas (and also have no meaningful error messages):
- Chapter07\PointSprites
- Chapter09\hdr_bloom
- Chapter09\hdr_imaging
- Chapter09\hdr_msaa
- Chapter10\oit

I'm running a Nvidia 280 GTX with the latest stable drivers, and opengl extension viewer says I have opengl 3.3 compatability with all the necessary extensions.

This is pretty disappointing that so many of the examples fail to execute properly, especially point sprites, which I was looking forward to. Has anyone else had better luck with the examples at http://www.starstonesoftware.com/files/SB5.zip ?

YarUnderoaker
08-22-2010, 10:43 AM
I heard that on Linux all works fine, but in windows there many bugs. Personally, I tested it on Radeon and Nvidia - many examples does not work :(

sauron
10-20-2010, 06:47 PM
Same problem here... I'm using linux with a Nvidia VGA card.

Kreed
10-20-2010, 06:58 PM
I have managed to get 7 - 10 to work by downloading the newest examples from their googlecode server. U have to use subversion to get the code. That code only works on Windows though.

11 and up simply crash for me.

I have had less success with ubuntu 10.10. I can compile aand run everything up to 7.

AlwaysLearning
02-13-2011, 03:41 AM
You can get the latest examples with source code (about 140MB) using:
svn checkout http://oglsuperbible5.googlecode.com/svn/trunk/ oglsuperbible5-read-only

The Linux example tree has a few issues. So far most of them have been filenames with wrong letter case or missing files...
[I'm using Radeon HD 5670 under Ubuntu 10.10 with the ATI Fire GL drivers.]

Chapter 01, Block:
When displaying textured cube, Block5.tga and Block6.tga faces are black. Not sure why.

Chapter 05, SphereWorld:
Nothing is displayed because Src/Chapter05/SphereWorld/SphereWorld.cpp wants to load "marble.tga", "marslike.tga" and "moonlike.tga" files but in Linux/Chapter05/SphereWorld these files are named "Marble.tga", "Marslike.tga" and "MoonLike.tga". Fixing the file names makes it work.

Chapter 06, Textured Triangle:
All I get is a white triangle. Not sure why.

Chapter 07, Cube Mapped:
Nothing is displayed because Linux/Chapter07/CubeMapped is missing the pos_x.tga and pos_y.tga files. If you copy them from Src/Chapter07/CubeMapped it works.

Chapter 07, Point Sprites:
Line 128 of Src/Chapter07/PointSprites/PointSprites.cpp loads "Star.tga" but in Linux/Chapter07/PointSprites the file is named "star.tga". If you renamed the file to "Star.tga" it works. Note also, the star.tga file in Linux is diamond shaped whereas versions in other trees are circular - only a minor display difference.

Chapter 07, Texture Arrays:
When making this for Linux, I had to change line 7 of Src/Chapter07/TextureArrays/TextureArrays.cpp from:
#include <Stopwatch.h>
to:
#include <StopWatch.h>
Also renamed "star.tga" to "Star.tga" in the output directory.

That's about as far as I've read. Does anyone know where you can report SuperBible bugs? I've had a good look through the book and StarStoneSoftware/OpenGL web sites to no avail - is the forum really the place?

AlwaysLearning
02-13-2011, 04:16 AM
Chapter 06, Textured Triangle:
All I get is a white triangle. Not sure why.


Just figured this one out - running from the console instead of from Nautilus gives me a texture compiler error.

The file Linux/Chapter06/TexturedTriangle/TextureIdentity.fp has "smooth in vec4 vVaryingTexCoords;" instead of "smooth in vec2 vVaryingTexCoords;"

You can edit this manually or copy the updated from Src/Chapter06/TexturedTriangle

mobeen
02-13-2011, 04:34 AM
Check these threads.
http://code.google.com/p/oglsuperbible5/issues/detail?id=18
http://www.opengl.org/discussion_boards/ubbthreads.php?ubb=showflat&amp;Number=284885#Post2848 85

AlwaysLearning
02-13-2011, 05:14 AM
Check these threads.
I'll keep an eye on those as I work through chapters 8 and 9 this week. Thanks, mobeen.

mobeen
02-13-2011, 05:20 AM
I have compiled and run all the demos successfully. Before posting your error, check the latest svn source. You can either post the issue here and we will help u fix it or check the google code site http://code.google.com/p/oglsuperbible5/issues
may be the issue has been addressed already.