Witajcie, tak jak w temacie. Zamiast obrazka wyświetla mi się czarne tło :( Pomóżcie kochani. Proszę <3
#include <SFML/Graphics.hpp>
int main()
{
sf::RenderWindow MainWindow(sf::VideoMode(600, 400), "BSS");
sf::Texture MainMenuTexture;
if (!MainMenuTexture.loadFromFile("_MainMenu.png"))
{
system("pause");
}
sf::Sprite MainMenuSprite;
MainMenuSprite.setTexture(MainMenuTexture);
while (MainWindow.isOpen())
{
sf::Event event;
while (MainWindow.pollEvent(event))
{
if (event.type == sf::Event::Closed)
MainWindow.close();
}
MainWindow.clear();
MainWindow.display();
MainWindow.draw(MainMenuSprite);
}
return 0;
}