31 lines
523 B
C++
31 lines
523 B
C++
#include <SFML/Graphics.hpp>
|
|
/*
|
|
int main()
|
|
{
|
|
sf::RenderWindow window(sf::VideoMode(800, 600), "SFML works!");
|
|
|
|
sf::Texture texture;
|
|
if (!texture.loadFromFile("happy.png"))
|
|
{
|
|
return -1;
|
|
}
|
|
sf::Sprite sprite(texture);
|
|
|
|
sprite.setPosition(100,100);
|
|
|
|
while (window.isOpen())
|
|
{
|
|
sf::Event event;
|
|
while (window.pollEvent(event))
|
|
{
|
|
if (event.type == sf::Event::Closed)
|
|
window.close();
|
|
}
|
|
|
|
window.clear();
|
|
window.draw(sprite);
|
|
window.display();
|
|
}
|
|
|
|
return 0;
|
|
}*/ |