Etrange.
Perennials* perenial = new Perennials();
// sfml window
mWindow* w = new mWindow(perenial);
sf::Texture splash;
if(!splash.loadFromFile("Data/gui/splash/splashscreen.jpg"))
{
exit(0);
}
sf::Sprite spr(splash);
sf::Event event;
while(w->Running()) {
// Clearing out the window
w->Clear();
// Event processing.
while(w->GetEvent(event)) {
}
w->Draw(spr);
w->Render();
}
Ce code marche... donc c'est dans SplashScreen.
Tu as la fonction Run(), voici le header.
class mWindow;
class ClientSocket;
class SplashScreen: public Screen
{
public:
SplashScreen(mWindow* wd, ClientSocket* tcps)
{
m_window = wd;
m_tcpsocket = tcps;
}
~SplashScreen() {}
int Run ();
static const int ID = 1;
private:
// Common structure
sfg::SFGUI m_sfgui;
sfg::Desktop desktop;
sf::Event event;
sf::Clock clock;
};
// et voici Screen
class mWindow;
class ClientSocket;
class Screen
{
public :
virtual int Run () = 0;
mWindow* m_window;
ClientSocket* m_tcpsocket;
ClientSocket* m_udpsocket;
};
edit:
De plus, avec ce code quand je ferme l'appli je n'ai aucun probleme, avec l'original, je crash. Mais ca c'est du a sfgui il me semble.