OpenGL Superbible 6th ed.

Hi,

I just decided to start learning OpenGL and thus bought the newly released book OpenGL Superbible, 6th Edition. However I’m unable to setup the source code for visual studio.

The source code is available at “openglsuperbible . com / example-code”

I have added “sb6code/include/” to Property Pages -> VC++ Directories -> Include Directories, and “sb6code/lib” to Property Pages -> VC++ Directories -> Library Directories and also added “GLFW_d32.lib”, “sb6_d32.lib”, “zdll.lib” and “zlib.lib” to Property Pages -> Linker -> Input -> Additional Dependencies as well as added all the “include” files to the Project Directory and added them to the project through Add-> Existing Items.

When I build the project it complains about “glfw.h” is missing. I guess I also have to setup the GLFW library (also included in the source files) somehow but I have been unsuccessful with this (I get tons of compiler errors).

Any help would be greatly appreaciated.

Thanks in advance!

/Robin

Your question is not about OpenGL but general programming. What do you normally do in any C++ program when you have the compiler tell you that “somefile.h” is missing? Learn C++ first and all the relevant tools like the compiler, editor, debugger, profiler, etc… before trying to learn graphics.

Even though the Superbible 6th edition markets itself to beginners, I am sure they didn’t mean C++ beginners, but beginning graphics programmers.

Any help would be greatly appreaciated.

You should use the Visual Studio project or, failing that, the CMake project that comes with it.

[QUOTE=Jesse;1253622]Your question is not about OpenGL but general programming. What do you normally do in any C++ program when you have the compiler tell you that “somefile.h” is missing? Learn C++ first and all the relevant tools like the compiler, editor, debugger, profiler, etc… before trying to learn graphics.

Even though the Superbible 6th edition markets itself to beginners, I am sure they didn’t mean C++ beginners, but beginning graphics programmers.[/QUOTE]

Dont try to be a wise boy. I know both C++, C#, C, Lua and UnrealScript. I simply don’t know how to setup GLFW (which is OpenGL related for that matter and the documentation on their website doesn’t make any sense). Also, setting up and linking a library in Visual Studio has nothing to do with C++. So if you don’t have anything usefull to say then please dont post at all.

You should use the Visual Studio project or, failing that, the CMake project that comes with it.

If I load up the sb6.sln project in visual studio I can get a few of the samples to run. But many of them simply generates an Asssertion (stream != null) error.

this has nothing to do with your question but; i have the superbible and the opengl programming guide. i started reading the superbible and hated it so i went back to the programming guide. you should pick up a copy of the programming guide, much better. the programming guide also uses freeglut instead of sb6 this might make things easier for you. cheers

If I load up the sb6.sln project in visual studio I can get a few of the samples to run. But many of them simply generates an Asssertion (stream != null) error.

Then the build system is broken and you should take that up with the source code’s owner.

I haven’t read the 6th edition, but I did like the 5th edition a lot. I felt it was straight to the point. However, I took a different approach to what’s apparently proposed by this books that supply source code: I completely ignored it.

I just went along with the book and implemented my own stuff from scratch. Perhaps this approach will serve the OP too? He says he already has experience, so I see no reason why he couldn’t simply follow the book without the source code.

Hey everyone,

I hated the 5th edition of the SuperBible, and I think the 6th edition is fantastic! It’s got a new lead author (though Mr. Wright is still attached to the project) and I think it’s organized extremely well. So I hope that SuperBible hating (which I took part in) is a thing of the past.

DreamCore, you should be able to load up the GLFW library by including the glfw.h file and also linking in the GLFW_d32 or GLFW_r32 libraries, depending on if you are running in Debug or Release. I linked in GLFW_d32 and sb6_d32, and included all the .h files in the include folder of sb6core, and all projects compiled.

I’m getting failed asserts on a few of them but they all compile at least.

If you’re still having trouble, try posting some of the errors.

~Philip

Hi,I am having Problems with VS 2012.Everything is set up correctly,but i keep getting message:

“sb6_d32.lib(sb6ktx.obj) : error LNK2038: mismatch detected for ‘_MSC_VER’: value ‘1600’ doesn’t match value ‘1700’ in Source.obj”.

I know its because the library is intended for use with VS 2010 but is there a way how can i recompile the library for 2012 or just to dismiss that warning? I dont want to install 2010. Thanks anybody for help :slight_smile:

LOL,I just found out how to solve it … Project->Properties->General->Platform Toolset v100 (VS 2010) …
But still I would like to have that VS2012 lib :smiley:

The OP’s issue is that the project build directory and the projects (all projects in the solution) are set to a different folder. The author has the relative path meant to be run from the build directory. This makes the files run fine if you run them from windows explorer but not if you are debugging. The quickest fix is to just copy the media directory from the “bin/” directory to “sb6code/build/vs2010/”

Hey, I’ve had the book sitting on my shelf since it came out and today was the first day I started working the examples from the book. If you still need help setting up a visual studio project from scratch, let me know.

Maybe this is not related to the OP’s problem but when im trying to compile the first examplecode (red window) im getting c2144 and c4430 errors in the string.h. Im using Visual Studio 13 and the header from the website od the Super Bible.
Would like to know if u get similar errors if not at least i know its my / my pc’s fault.