openglsuperbible/sb6code

How can I see the result window?

Closed this issue · 0 comments

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.