1
Window / Using glew with sfml 2.0 problem
« on: June 07, 2011, 10:22:03 am »
Ah of course, thank you
This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <GL/glew.h>
#include <SFML/Window.hpp>
#include <SFML/OpenGL.hpp>
#define WINDOW_TITLE_PREFIX "Chapter 2"
void Initialize(int, char*[]);
void InitWindow(void);
int main(int argc, char* argv[])
{
InitWindow();
Initialize(argc, argv);
exit(EXIT_SUCCESS);
}
void InitWindow()
{
sf::Window App(sf::VideoMode(800, 600, 32), "OpenGL");
}
void Initialize(int argc, char* argv[])
{
GLenum GlewInitResult;
glewExperimental = GL_TRUE;
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)
);
}