Results 1 to 2 of 2

Thread: How to compile and run the examples of blue book?

  1. #1
    Newbie Newbie
    Join Date
    Aug 2014
    Posts
    1

    Post How to compile and run the examples of blue book?

    I'm very new to OpenGL. I want to learn it from the Blue Book (OpenGL superbible 6th edition).

    When I compile the first program with Visual Studio 2013, everything goe well, except that a white window appears and then the program quit with code 0.

    The program is:
    // Include the "sb6.h" header file
    #include "sb6.h"
    // Derive my_application from sb6::application
    class my_application : public sb6::application
    {
    public:
    // Our rendering function
    void render(double currentTime)
    {
    // Simply clear the window with red
    static const GLfloat red[] = { 1.0f, 0.0f, 0.0f, 1.0f };
    glClearBufferfv(GL_COLOR, 0, red);
    }
    };
    // Our one and only instance of DECLARE_MAIN
    DECLARE_MAIN(my_application);
    I think both the compiling and building process are working fine because the result code 0. But I cannot figure out why I don't see a red output window. Please help me.

  2. #2
    Member Contributor
    Join Date
    Jul 2014
    Location
    Italy, Lissone
    Posts
    80
    Quote Originally Posted by zybjtu View Post
    I'm very new to OpenGL. I want to learn it from the Blue Book (OpenGL superbible 6th edition).

    When I compile the first program with Visual Studio 2013, everything goe well, except that a white window appears and then the program quit with code 0.

    The program is:

    I think both the compiling and building process are working fine because the result code 0. But I cannot figure out why I don't see a red output window. Please help me.
    i don't know if you included lib and include files but seems this is your error so
    if you are using VisualStudio you have to go in Project/(your project's name)Properties:
    solution.jpg

    then in "Include Directiories" you have to put the include folder and the extern/glwf folder downloaddable from here: http://openglsuperbible.com/files/sb...2013_11_10.zip
    and in "Library Directiories" you have to put the lib folder
    Attached Images Attached Images

Similar Threads

  1. GLUT menu creation problem (Blue Book v5, Linux)
    By musasabi in forum OpenGL: Basic Coding
    Replies: 1
    Last Post: 01-30-2012, 06:35 AM
  2. newer versions of the red and blue book?
    By noeska in forum OpenGL: General
    Replies: 2
    Last Post: 01-04-2009, 06:04 AM
  3. OpenGL Blue Book
    By ToddAtWSU in forum OpenGL: Basic Coding
    Replies: 1
    Last Post: 02-08-2007, 10:02 PM
  4. Updated version of blue book?
    By Chris244 in forum OpenGL: General
    Replies: 6
    Last Post: 08-04-2006, 11:27 AM
  5. Problem in reading the "Blue Book"
    By Heifer in forum OpenGL: Basic Coding
    Replies: 1
    Last Post: 10-26-2005, 01:09 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Proudly hosted by Digital Ocean