Quantcast
Channel: Forum Pasja Informatyki - Najnowsze pytania
Viewing all articles
Browse latest Browse all 65225

C::B Kłopot z SFML (program wywala)

$
0
0

Nie ogarniam tego....  Najpierw musiałem mieć SFML 2.3.2 a tera gdy się ucze i testuje to wywala mi okno po uruchomieniu programu z C::B. HELP!!!

(Gdyby było to potrzebne to mam MinGw 12.11 C::B i Windowsa10)

Może coś w kodzie nie tak więc podaje kod...

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

int main()
{
    sf::RenderWindow okno( sf::VideoMode( 800, 600, 32 ), "Galaxy" );
    while( okno.isOpen() )
    {
        sf::Event zdarzenie;
        while( okno.pollEvent( zdarzenie ) )
        {
            if( zdarzenie.type == sf::Event::Closed )
                 okno.close();

            if( zdarzenie.type == sf::Event::KeyPressed && zdarzenie.key.code == sf::Keyboard::Escape )
                 okno.close();

            if( zdarzenie.type == sf::Event::MouseButtonPressed && zdarzenie.mouseButton.button == sf::Mouse::Middle )
                 okno.close();

        }
        okno.clear();
    }
    return 0;
}

 


Viewing all articles
Browse latest Browse all 65225

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>