Here's my code :
#include <SFML/Graphics.hpp>
#include <string>
#include <iostream>
int main(void) {
sf::RenderWindow Window;
Window.create(sf::VideoMode(640, 480), "First app", sf::Style::Titlebar | sf::Style::Close);
sf::Texture pTexture;
sf::Sprite playerImage;
pTexture.loadFromFile("player.png");
playerImage.setTexture(pTexture);
while(Window.isOpen()) {
sf::Event Event;
while(Window.pollEvent(Event)) {
switch(Event.type) {
case sf::Event::Closed :
Window.close();
break;
}
}
Window.draw(playerImage);
Window.display();
}
}
And here's the message that come on the console window :
An internal OpenGL call failed in Texture.cpp <146> : GL_INVALID_ENUM, an unacceptable
value has been specified for an enumerated argument
An internal OpenGL call failed in Texture.cpp <147> : GL_INVALID_ENUM, an
unacceptable value has been specified for an enumerated argument