Hi all,
I recently ran into some trouble trying to get GLEW working in SFML.
Currently the SFML libraries are static, and the GLEW library is dynamically linked- with a DLL in beside the .exe, is this correct?
The problem is that when I try and use
any of the GL extensions I get an access violation error:
int main()
{
sf::RenderWindow window(sf::VideoMode(800, 600), "Test", sf::Style::Default, sf::ContextSettings(32));
glewExperimental = GL_TRUE;
GLenum glewErr = glewInit();
if (glewErr != GLEW_OK)
std::cout << "GLEW not OK...";
else
std::cout << "GLEW is OK...";
if (!GLEW_ARB_vertex_buffer_object)
{
std::cout << "Not supported...";
}
unsigned int temp = 0;
glGenBuffers(1,&temp); // Access violation reading '0x000...'
Visual C++ throws an access violation error at the glGenBuffers line.
Most similar problems I see online are because of omitting 'glewInit()', or 'glewExperimental = GL_TRUE'.
Is it possibly a problem with the way I have set up GLEW?
(glewInit returns GLEW_OK, and by using glGetString(GL_EXTENSIONS) [or something] I am sure that my drivers support VBOs, they are part of the standard anyway aren't they?)
Any help would be much appreciated,
thanks.