Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: orxonox.OLD/branches/new_class_id/src/lib/graphics/importer/resource_texture.cc @ 9784

Last change on this file since 9784 was 9784, checked in by bensch, 18 years ago

orxonox/new_class_id: new Resources stuff

File size: 665 bytes
Line 
1
2
3#include "resource_texture.h"
4
5
6
7ResourceTexture::ResourceTexture(const std::string& imageName, GLenum target)
8{
9  Resource::Pointer* ptr = this->acquireResource(ResourceTexture::type, imageName + ',' + "TEST");
10
11  if (ptr)
12    this->acquireData(static_cast<ResourceTexture::TextureResourcePointer*>(ptr)->ptr());
13  else
14  {
15    this->loadImage(imageName, target);
16  }
17}
18
19
20Resource::Type ResourceTexture::type(Texture::staticClassID());
21
22
23
24
25
26ResourceTexture::TextureResourcePointer::TextureResourcePointer(const std::string& loadString, const Resource::KeepLevel& keepLevel, TextureData* data)
27    : Resource::Pointer(loadString, keepLevel) , pointer(data)
28{
29}
30
31
Note: See TracBrowser for help on using the repository browser.