You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
mxe/src/sfml-test.cpp

46 lines
912 B

/*
* This file is part of MXE. See LICENSE.md for licensing information.
*/
#include <SFML/Audio.hpp>
#include <SFML/Network.hpp>
#include <SFML/Graphics.hpp>
using namespace sf;
int main()
{
// Create the main window
RenderWindow window(VideoMode(800, 600), "SFML window");
Music music;
Texture texture;
Font font;
Text text;
TcpSocket socket;
CircleShape shape(200);
shape.setPosition(200, 100);
shape.setFillColor(Color::Red);
while (window.isOpen())
{
// Process events
Event event;
while (window.pollEvent(event))
{
// Close window : exit
if (event.type == Event::Closed)
window.close();
}
// Clear screen
window.clear();
// Draw the sprite
window.draw(shape);
// Update the window
window.display();
}
return 0;
}