Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 7229 in orxonox.OLD for branches/resources/src/lib/graphics


Ignore:
Timestamp:
Mar 21, 2006, 3:13:34 PM (18 years ago)
Author:
bensch
Message:

resources: some minor implementations

Location:
branches/resources/src/lib/graphics
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • branches/resources/src/lib/graphics/graphics_engine.cc

    r7221 r7229  
    357357
    358358#ifdef __WIN32__
     359  // renewing GL-settings
     360  glEnable(GL_DEPTH_TEST);
     361
    359362  // REBUILDING TEXTURES (ON WINDOWS CONTEXT SWITCH)
    360363  const std::list<BaseObject*>* texList = ClassList::getList(CL_TEXTURE);
  • branches/resources/src/lib/graphics/importer/material.cc

    r7221 r7229  
    8383    ResourceManager::getInstance()->unload(this->diffuseTexture);
    8484  if (m.diffuseTexture != NULL)
    85     this->diffuseTexture = (Texture*)ResourceManager::getInstance()->copy(m.diffuseTexture);
     85    this->diffuseTexture = dynamic_cast<Texture*>(ResourceManager::getInstance()->copy(m.diffuseTexture));
    8686  this->ambientTexture = NULL; /// FIXME
    8787  this->specularTexture = NULL; /// FIXME
     
    298298  //! @todo Textures from .mtl-file need special care.
    299299  if (!dMap.empty())
    300     this->diffuseTexture = (Texture*)ResourceManager::getInstance()->load(dMap, IMAGE, RP_GAME, (int)target);
     300    this->diffuseTexture = dynamic_cast<Texture*>(ResourceManager::getInstance()->load(dMap, IMAGE, RP_GAME, (int)target));
    301301  else
    302302    this->diffuseTexture = NULL;
  • branches/resources/src/lib/graphics/importer/texture.h

    r7221 r7229  
    88
    99#include "base_object.h"
     10#include "lib/util/loading/resource.h"
    1011
    1112#include "glincl.h"
     
    1516
    1617//! A Class, that reads in Textures from different fileformats.
    17   class Texture : public BaseObject
     18  class Texture : public Loading::Resource
    1819  {
    1920    public:
     
    4344
    4445    protected:
    45 
    4646      bool setSurface(SDL_Surface* newSurface);
    4747      bool setAlpha(bool hasAlpha) { this->bAlpha = hasAlpha; };
  • branches/resources/src/lib/graphics/text_engine/text.cc

    r7221 r7229  
    8888  if (!fontFile.empty())
    8989  {
    90     tmpFont = (Font*)ResourceManager::getInstance()->load(fontFile, TTF, RP_GAME, (int)fontSize);
     90    tmpFont = dynamic_cast<Font*>(ResourceManager::getInstance()->load(fontFile, TTF, RP_GAME, (int)fontSize));
    9191    if (tmpFont != NULL)
    9292      this->font = tmpFont;
Note: See TracChangeset for help on using the changeset viewer.