Added the trunk/branches/tags directories at repository root, and moved previous root into trunk/
git-svn-id: https://sfml.svn.sourceforge.net/svnroot/sfml/trunk@1002 4e206d99-4929-0410-ac5d-dfc041789085
This commit is contained in:
commit
2f524481c1
974 changed files with 295448 additions and 0 deletions
|
@ -0,0 +1,42 @@
|
|||
|
||||
////////////////////////////////////////////////////////////
|
||||
// Headers
|
||||
////////////////////////////////////////////////////////////
|
||||
#include <SFML/Graphics.hpp>
|
||||
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// Entry point of application
|
||||
///
|
||||
/// \return Application exit code
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
int main()
|
||||
{
|
||||
// Create main window
|
||||
sf::RenderWindow App(sf::VideoMode(640, 480), "SFML Graphics");
|
||||
|
||||
// Start game loop
|
||||
while (App.IsOpened())
|
||||
{
|
||||
// Process events
|
||||
sf::Event Event;
|
||||
while (App.GetEvent(Event))
|
||||
{
|
||||
// Close window : exit
|
||||
if (Event.Type == sf::Event::Closed)
|
||||
App.Close();
|
||||
}
|
||||
|
||||
// Clear screen
|
||||
App.Clear();
|
||||
|
||||
// Draw apredefined shape
|
||||
App.Draw(sf::Shape::Circle(200, 200, 100, sf::Color::Yellow, 10, sf::Color::Blue));
|
||||
|
||||
// Finally, display the rendered frame on screen
|
||||
App.Display();
|
||||
}
|
||||
|
||||
return EXIT_SUCCESS;
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue