Hey all,
I'm coding on a Macbook, trying to run the following program:
#include <SFML/Graphics.hpp>
#include <SFML/OpenGL.hpp>
int main() {
sf::RenderWindow app(sf::VideoMode(640, 480), "OpenGL");
while (app.isOpen()) {
sf::Event e;
while (app.pollEvent(e)) {
if (e.type == sf::Event::Closed) {
app.close();
}
}
static const GLfloat red[] = {1.0f, 0.0f, 0.0f, 1.0f};
glClearBufferfv(GL_COLOR, 0, red);
app.display();
}
return 0;
}
However, I get the following error:
sb2-1.cpp:25:9: error: use of undeclared identifier 'glClearBufferfv'
glClearBufferfv(GL_COLOR, 0, red);
^
1 error generated.
Using glClear() instead of glClearBufferfv() works perfectly well.
Is there something I need to do to make SFML play nice with newer OpenGL besides what's listed in the docs? Thanks!