Changeset 9784 in orxonox.OLD for branches/new_class_id/src/lib/graphics
- Timestamp:
- Sep 22, 2006, 12:19:51 AM (18 years ago)
- Location:
- branches/new_class_id/src/lib/graphics/importer
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/new_class_id/src/lib/graphics/importer/resource_texture.cc
r9781 r9784 5 5 6 6 7 ResourceTexture::ResourceTexture(const std::string& imageName, GLenum target) 8 { 9 Resource::Pointer* ptr = this->acquireResource(ResourceTexture::type, imageName + ',' + "TEST"); 7 10 8 ResourceTexture::TextureResourcePointer::TextureResourcePointer(TextureData* data) 9 { 10 this->pointer = new TextureData::Pointer(data); 11 if (ptr) 12 this->acquireData(static_cast<ResourceTexture::TextureResourcePointer*>(ptr)->ptr()); 13 else 14 { 15 this->loadImage(imageName, target); 16 } 11 17 } 12 18 13 19 14 20 Resource::Type ResourceTexture::type(Texture::staticClassID()); 21 22 23 24 25 26 ResourceTexture::TextureResourcePointer::TextureResourcePointer(const std::string& loadString, const Resource::KeepLevel& keepLevel, TextureData* data) 27 : Resource::Pointer(loadString, keepLevel) , pointer(data) 28 { 29 } 30 31 -
branches/new_class_id/src/lib/graphics/importer/resource_texture.h
r9781 r9784 18 18 19 19 private: 20 class TextureResourcePointer 20 class TextureResourcePointer : public Resource::Pointer 21 21 { 22 22 public: 23 TextureResourcePointer(TextureData* data); 23 TextureResourcePointer(const std::string& loadString, const Resource::KeepLevel& keepLevel, TextureData* data); 24 inline const TextureData::Pointer& ptr() const { return pointer; } 24 25 private: 25 TextureData::Pointer *pointer;26 TextureData::Pointer pointer; 26 27 }; 27 28 -
branches/new_class_id/src/lib/graphics/importer/texture.h
r9719 r9784 30 30 Texture& operator=(const Texture& texture); 31 31 Texture& operator=(const TextureData::Pointer& textureDataPointer); 32 void acquireData(const TextureData::Pointer& textureDataPointer) { this->data = textureDataPointer; }; 33 const TextureData::Pointer& dataPointer() const { return data; } 32 34 33 35 virtual ~Texture();
Note: See TracChangeset
for help on using the changeset viewer.