Skip to content

Instantly share code, notes, and snippets.

@EddyLuten
Last active August 29, 2015 14:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save EddyLuten/11130470 to your computer and use it in GitHub Desktop.
Save EddyLuten/11130470 to your computer and use it in GitHub Desktop.
Chapter 1, Snippet 2 - OpenGLBook.com
void Initialize(int argc, char* argv[])
{
GLenum GlewInitResult;
InitWindow(argc, argv);
GlewInitResult = glewInit();
if (GLEW_OK != GlewInitResult) {
fprintf(
stderr,
"ERROR: %s\n",
glewGetErrorString(GlewInitResult)
);
exit(EXIT_FAILURE);
}
fprintf(
stdout,
"INFO: OpenGL Version: %s\n",
glGetString(GL_VERSION)
);
glClearColor(0.0f, 0.0f, 0.0f, 0.0f);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment