Part of the Khronos Group
OpenGL.org

The Industry's Foundation for High Performance Graphics

from games to virtual reality, mobile phones to supercomputers

Page 1 of 2 12 LastLast
Results 1 to 10 of 12

Thread: OpenGL Superbible 6th ed.

  1. #1
    Junior Member Newbie
    Join Date
    Aug 2013
    Posts
    10

    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

  2. #2
    Junior Member Newbie
    Join Date
    Jul 2011
    Location
    USA
    Posts
    23
    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.

  3. #3
    Senior Member OpenGL Guru
    Join Date
    May 2009
    Posts
    4,948
    Any help would be greatly appreaciated.
    You should use the Visual Studio project or, failing that, the CMake project that comes with it.

  4. #4
    Junior Member Newbie
    Join Date
    Aug 2013
    Posts
    10
    Quote Originally Posted by Jesse View Post
    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.
    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.
    Last edited by DreamCore; 08-08-2013 at 11:45 AM.

  5. #5
    Intern Contributor
    Join Date
    Jun 2013
    Posts
    70
    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

  6. #6
    Senior Member OpenGL Guru
    Join Date
    May 2009
    Posts
    4,948
    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.

  7. #7
    Intern Contributor
    Join Date
    Oct 2011
    Posts
    59
    Quote Originally Posted by sandbucket View Post
    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
    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.

  8. #8
    Newbie Newbie
    Join Date
    Aug 2013
    Posts
    1
    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

  9. #9
    Newbie Newbie
    Join Date
    Oct 2013
    Posts
    1
    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

    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 ...
    Last edited by nVidian; 10-08-2013 at 03:38 AM. Reason: Found out something :)

  10. #10
    Newbie Newbie
    Join Date
    Oct 2013
    Posts
    1
    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/"

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •