SFML community forums

Help => General => Topic started by: djmentos on May 28, 2010, 10:10:50 pm

Title: Tutorial doesnt work
Post by: djmentos on May 28, 2010, 10:10:50 pm
hi.

i copied a code from tutorial:
Code: [Select]

#include <SFML/Graphics.hpp>
#include <SFML/Window.hpp>

int main()
{
    // Create the main rendering window
    sf::RenderWindow App(sf::VideoMode(800, 600, 32), "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();
        }

        App.Clear(sf::Color(200, 0, 0));
        App.Display();
    }

    return EXIT_SUCCESS;
}

And the main while dont work but if i del line:

        App.Clear(sf::Color(200, 0, 0));

all is right.
Title: Tutorial doesnt work
Post by: Mindiell on May 28, 2010, 10:22:49 pm
What is your version of SFML ?
Title: Tutorial doesnt work
Post by: djmentos on May 28, 2010, 10:29:15 pm
1.7
Title: Tutorial doesnt work
Post by: Laurent on May 28, 2010, 11:29:07 pm
Ubuntu 10? ATI graphics card?
Title: Tutorial doesnt work
Post by: djmentos on May 29, 2010, 07:58:56 am
Win Vista, intergrated, not ATI (Intel).