Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 5079 in orxonox.OLD for trunk/src/lib


Ignore:
Timestamp:
Aug 19, 2005, 5:10:35 AM (19 years ago)
Author:
bensch
Message:

orxonox/trunk: minor optimisations

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/lib/graphics/graphics_engine.cc

    r5078 r5079  
    4646  this->maxFPS = 0;
    4747
     48  this->geTextCFPS = NULL;
     49  this->geTextMaxFPS = NULL;
     50  this->geTextMinFPS = NULL;
     51
    4852  this->fullscreenFlag = 0;
    4953}
     
    6064{
    6165  // delete what has to be deleted here
     66  delete this->geTextCFPS;
     67  delete this->geTextMaxFPS;
     68  delete this->geTextMinFPS;
     69
    6270
    6371  delete Render2D::getInstance();
     
    445453    {
    446454#ifndef NO_TEXT
    447       this->geTextCFPS = TextEngine::getInstance()->createText("fonts/arial_black.ttf", 15, TEXT_DYNAMIC, 0, 255, 0);
    448       this->geTextCFPS->setAlignment(TEXT_ALIGN_LEFT);
    449       this->geTextCFPS->setPosition2D(5, 5);
     455if (this->geTextCFPS == NULL)
     456{
     457  this->geTextCFPS = TextEngine::getInstance()->createText("fonts/arial_black.ttf", 15, TEXT_DYNAMIC, 0, 255, 0);
     458  this->geTextCFPS->setAlignment(TEXT_ALIGN_LEFT);
     459  this->geTextCFPS->setPosition2D(5, 5);
     460}
     461if (this->geTextMaxFPS == NULL)
     462{
    450463      this->geTextMaxFPS = TextEngine::getInstance()->createText("fonts/arial_black.ttf", 15, TEXT_DYNAMIC, 0, 255, 0);
    451464      this->geTextMaxFPS->setAlignment(TEXT_ALIGN_LEFT);
    452465      this->geTextMaxFPS->setPosition2D(5, 35);
     466}
     467if (this->geTextMinFPS == NULL)
     468{
    453469      this->geTextMinFPS = TextEngine::getInstance()->createText("fonts/arial_black.ttf", 15, TEXT_DYNAMIC, 0, 255, 0);
    454470      this->geTextMinFPS->setAlignment(TEXT_ALIGN_LEFT);
    455471      this->geTextMinFPS->setPosition2D(5, 65);
     472}
    456473#endif /* NO_TEXT */
    457474    }
Note: See TracChangeset for help on using the changeset viewer.