Hi
, I'm a beginner programmer in general, and im new to SFML, I find SFML great so far
.
I have an issue which is sfml seems to load images at the same time(mayb im wrong), what i want to do is to load an image from file and then display it, then after that, i want to load all images of my game
int main()
{
//RenderWindow window
sf::Image imgLS; // image loading screen
imgLS.loadFromFile("loadingScreen.png");
//setting up texture and sprite // sprLS
window.clear();
window.draw(sprLS);
window.display();
sf::Image img1, img2, ... imgn;
img1.loadFromFile("img1.png");
img2.loadFromFile("img2.png");
.
.
.
imgn.loadFromFile("imgn.png");
startFunction(); //function that uses n images displaying them
/*
while window is open stuff, with event
*/
}
its like a loading screen is shown while other images are being loaded, when all game images are loaded, function startFunction() starts.
OUTPUT:
black screen untill startFunction() starts;
QUESTION:
is it possible to load an image, display it and then load other images while displaying it?