Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 5515 in orxonox.OLD for trunk/src


Ignore:
Timestamp:
Nov 9, 2005, 1:16:17 AM (19 years ago)
Author:
bensch
Message:

orxonox/trunk: unloading of fonts now without a Warning from the ResourceManager

Location:
trunk/src/lib/graphics/text_engine
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/lib/graphics/text_engine/text.cc

    r5420 r5515  
    4949Text::~Text()
    5050{
    51   if (this->font != NULL)
     51  if (this->font != NULL && this->font != Font::defaultFont)
    5252    ResourceManager::getInstance()->unload(this->font);
    5353
     
    8989
    9090  // unloading the Font if we alrady have one loaded.
    91   if (this->font != NULL)
     91  if (this->font != NULL && this->font != Font::defaultFont)
    9292    ResourceManager::getInstance()->unload(this->font);
    9393  this->font = NULL;
  • trunk/src/lib/graphics/text_engine/text_engine.cc

    r5357 r5515  
    8484    while( font != NULL)
    8585    {
    86       ResourceManager::getInstance()->unload(font, RP_GAME);
     86      if (likely(font != Font::getDefaultFont()))
     87        ResourceManager::getInstance()->unload(font, RP_GAME);
    8788      font = dynamic_cast<Font*>(fontIterator->nextElement());
    8889    }
  • trunk/src/lib/graphics/text_engine/text_engine.h

    r5347 r5515  
    1919#include "base_object.h"
    2020
    21 #include "vector.h"
    22 
    2321// FORWARD DECLARATION
    24 class PNode;
    25 class Font;
    26 class Text;
    2722
    2823//! A singleton Class that operates as a Handler initializing FONTS.
Note: See TracChangeset for help on using the changeset viewer.