Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 9869 in orxonox.OLD for trunk/src/world_entities/skybox.cc


Ignore:
Timestamp:
Oct 3, 2006, 12:19:30 AM (18 years ago)
Author:
bensch
Message:

orxonox/trunk: merged the new_class_id branche back to the trunk.
merged with command:
svn merge https://svn.orxonox.net/orxonox/branches/new_class_id trunk -r9683:HEAD
no conflicts… puh..

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/world_entities/skybox.cc

    r9656 r9869  
    2727#include "network_game_manager.h"
    2828#include "converter.h"
    29 #include "util/loading/resource_manager.h"
    30 
    31 
    32 
    33 
    34 CREATE_FACTORY(SkyBox, CL_SKYBOX);
     29#include "resource_texture.h"
     30
     31#include "debug.h"
     32
     33#include "class_id_DEPRECATED.h"
     34ObjectListDefinitionID(SkyBox, CL_SKYBOX);
     35CREATE_FACTORY(SkyBox);
    3536
    3637/**
     
    7273void SkyBox::preInit()
    7374{
    74   this->setClassID(CL_SKYBOX, "SkyBox");
     75  this->registerObject(this, SkyBox::_objectList);
    7576  this->toList(OM_BACKGROUND);
    7677  this->toReflectionList();
     
    112113    if (this->material[i])
    113114      delete this->material[i];
    114     if (this->cubeTexture[i])
    115       ResourceManager::getInstance()->unload(this->cubeTexture[i]);
    116115  }
    117116}
     
    174173                                  const std::string& posZ, const std::string& posX, const std::string& negX)
    175174{
    176   this->cubeTexture[0] = (Texture*)ResourceManager::getInstance()->load(negX, RP_LEVEL, IMAGE, GL_TEXTURE_CUBE_MAP_NEGATIVE_X_EXT);
    177   this->cubeTexture[1] = (Texture*)ResourceManager::getInstance()->load(posX, RP_LEVEL, IMAGE, GL_TEXTURE_CUBE_MAP_POSITIVE_X_EXT);
    178 
    179   this->cubeTexture[2] = (Texture*)ResourceManager::getInstance()->load(negY, RP_LEVEL, IMAGE, GL_TEXTURE_CUBE_MAP_NEGATIVE_Y_EXT);
    180   this->cubeTexture[3] = (Texture*)ResourceManager::getInstance()->load(posY, RP_LEVEL, IMAGE, GL_TEXTURE_CUBE_MAP_POSITIVE_Y_EXT);
    181 
    182   this->cubeTexture[4] = (Texture*)ResourceManager::getInstance()->load(negZ, RP_LEVEL, IMAGE, GL_TEXTURE_CUBE_MAP_NEGATIVE_Z_EXT);
    183   this->cubeTexture[5] = (Texture*)ResourceManager::getInstance()->load(posZ, RP_LEVEL, IMAGE, GL_TEXTURE_CUBE_MAP_POSITIVE_Z_EXT);
     175  this->cubeTexture[0] = ResourceTexture(negX, GL_TEXTURE_CUBE_MAP_NEGATIVE_X_EXT);
     176  this->cubeTexture[1] = ResourceTexture(posX, GL_TEXTURE_CUBE_MAP_POSITIVE_X_EXT);
     177
     178  this->cubeTexture[2] = ResourceTexture(negY, GL_TEXTURE_CUBE_MAP_NEGATIVE_Y_EXT);
     179  this->cubeTexture[3] = ResourceTexture(posY, GL_TEXTURE_CUBE_MAP_POSITIVE_Y_EXT);
     180
     181  this->cubeTexture[4] = ResourceTexture(negZ, GL_TEXTURE_CUBE_MAP_NEGATIVE_Z_EXT);
     182  this->cubeTexture[5] = ResourceTexture(posZ, GL_TEXTURE_CUBE_MAP_POSITIVE_Z_EXT);
    184183}
    185184
Note: See TracChangeset for help on using the changeset viewer.