Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
May 27, 2005, 12:44:55 AM (19 years ago)
Author:
bensch
Message:

orxonox/branches/physics: threads work :)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • orxonox/branches/physics/src/subprojects/particles/framework.cc

    r4316 r4317  
    294294}
    295295
     296Framework* Framework::singletonRef = NULL;
     297
     298Framework* Framework::getInstance(void)
     299{
     300  if (Framework::singletonRef == NULL)
     301    Framework::singletonRef = new Framework();
     302  return Framework::singletonRef;
     303}
    296304
    297305Framework::Framework()
     
    358366 
    359367  guiMainWindow = new Window("ParticlesFUN");
    360  
     368  {
     369    Box* windowBox = new Box('v');
     370    {
     371      Button* quitButton = new Button("quit");
     372      windowBox->fill(quitButton);
     373    }
     374    guiMainWindow->fill(windowBox);
     375  }
    361376  Window::mainWindow->showall();
    362377  mainloopGUI();
     
    370385  pthread_t guiThread;
    371386
    372   Framework* framework = new Framework();
     387  Framework* framework = Framework::getInstance();
    373388
    374389  pthread_create(&guiThread, NULL, Framework::initGui,(void*) argv);
Note: See TracChangeset for help on using the changeset viewer.