summaryrefslogtreecommitdiffstats
path: root/src/sfml-test.cpp
diff options
context:
space:
mode:
authorGuilherme Bernal <lb-guilherme@live.com>2013-06-24 14:05:03 (GMT)
committerTony Theodore <tonyt@logyst.com>2013-07-06 08:53:40 (GMT)
commit86b660d258f2a6610b96f8fbd8c583cc46c6727d (patch)
tree062e566774b6e07bd3d21e271c7105b1d386ca71 /src/sfml-test.cpp
parent50cecd1eae51b92d85a3b8773b6ef2d465b139bb (diff)
downloadmxe-86b660d258f2a6610b96f8fbd8c583cc46c6727d.zip
mxe-86b660d258f2a6610b96f8fbd8c583cc46c6727d.tar.gz
mxe-86b660d258f2a6610b96f8fbd8c583cc46c6727d.tar.bz2
add package sfml
Diffstat (limited to 'src/sfml-test.cpp')
-rw-r--r--src/sfml-test.cpp46
1 files changed, 46 insertions, 0 deletions
diff --git a/src/sfml-test.cpp b/src/sfml-test.cpp
new file mode 100644
index 0000000..5c08538
--- /dev/null
+++ b/src/sfml-test.cpp
@@ -0,0 +1,46 @@
+/*
+ * This file is part of MXE.
+ * See index.html for further 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;
+}