1
General / RenderWindow Runtime Error
« on: March 06, 2011, 03:40:22 pm »
Nevermind, I recompiled the libraries as described here and it works fine now
This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.
#include <SFML/System.hpp>
#include <SFML/Graphics.hpp>
#include <SFML/Window.hpp>
#include <iostream>
int main()
{
// Create the main rendering window
sf::RenderWindow App(sf::VideoMode::GetDesktopMode(), "Test Program", sf::Style::Resize|sf::Style::Close);
App.SetSize(400, 200);
// 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 the screen (fill it with black color)
App.Clear();
// Display window contents on screen
App.Display();
}
return EXIT_SUCCESS;
}