mp-sfml/main.cc

31 lines
624 B
C++
Raw Normal View History

2024-06-18 10:04:50 +08:00
#include <SFML/System.hpp>
#include <SFML/Graphics.hpp>
#include <SFML/Window.hpp>
2024-06-18 11:16:30 +08:00
#include <spdlog/spdlog.h>
2024-06-18 10:04:50 +08:00
int main(int argc, char** const argv){
2024-06-18 11:16:30 +08:00
spdlog::info("Hello, World!");
2024-06-18 10:04:50 +08:00
sf::RenderWindow window(sf::VideoMode(800, 600), "mp");
sf::Texture texture;
sf::Sprite sprite;
bool running = true;
while(running){
sf::Event event;
while(window.pollEvent(event)){
if(event.type == sf::Event::Closed){
running = false;
}
if(event.type == sf::Event::KeyPressed){
if(event.key.code == sf::Keyboard::Escape){
running = false;
}
}
}
window.clear();
window.display();
}
return 0;
}