Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ///// RENDERING THREAD
- void V4Core::LoadingThread()
- {
- sf::Context context;
- window.setActive(true);
- while (continueLoading)
- {
- window.clear();
- // drawing some text
- t_version.setPosition(config.GetInt("resX")/2,config.GetInt("resY")/2);
- window.draw(t_version);
- window.display();
- }
- window.setActive(false);
- }
- ///// CALLING THE THREAD (from a different class)
- sf::Thread loadingThreadInstance(v4core->LoadingThread,v4core);
- v4core->continueLoading=true;
- v4core->window.setActive(false);
- loadingThreadInstance.launch();
- // Some code that takes some time
- v4core->continueLoading=false;
Advertisement
Add Comment
Please, Sign In to add comment