#include <SFML/Graphics.hpp>
int main(){
sf::RenderWindow window(sf::VideoMode(1280,720), "TesteGame");
window.setPosition(sf::Vector2i(65,5));
sf::Texture t; t.loadFromFile("Desert.png");
t.setRepeated(true);
sf::Sprite s(t,sf::IntRect(0,0,1280,720));
while (window.isOpen()){
sf::Event e;
while (window.pollEvent(e)){
if (e.type == sf::Event::Closed) window.close();
window.draw(s);
window.display();
}
}
return 0;
}
This is my code, it compiles without problems, but the the window shows some black areas that i don't know where they came from. Like this.
The picture used in the code.
http://s23.postimg.org/66z9whp8r/Desert.png