Hello everyone, I began to get acquainted with the library SFML, run a standard window.
Actually, it is impossible to load a png image into this window, when this process is implemented, a loop occurs and the program hangs.
Here is the code.
RenderWindow window(VideoMode(640, 480), "SFML works!"); CircleShape shape(100.f); shape.setFillColor(sf::Color::Green); /* Image i; i.loadFromFile("image/1232.png"); Texture t; t.loadFromImage(i); // если убрать блок комментария, то стандартное окно запускается. Sprite s; s.setTexture(t); s.setPosition(50, 25); */ while (window.isOpen()) { Event event; while (window.pollEvent(event)) { if (event.type == Event::Closed) window.close(); } window.clear(); window.draw(s); // shape для стандарта. window.display(); } return 0;