Próbuje stworzyć program tworzący kształt. Przy próbie nadania mu koloru pojawia się błąd:
error: no matching function for call to 'sf::RectangleShape::setFillColor(int, int, int)'|
#include <SFML/Graphics.hpp>
int main()
{
sf::RenderWindow okno( sf::VideoMode( 1280, 800, 32 ), "Program" );
sf::RectangleShape podloga( sf::Vector2f( 800, 100 ) ); // prostokąt
podloga.setPosition( 0, 0 ); // pozycja
podloga.setFillColor( 0, 0, 0); //kolor
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();
}
okno.draw(podloga);
okno.clear( sf::Color( 0, 0, 32 ) );
okno.display();
}
return 0;
}