Changeset 9847 in orxonox.OLD for branches/new_class_id/src/lib/graphics
- Timestamp:
- Sep 27, 2006, 11:25:43 PM (18 years ago)
- Location:
- branches/new_class_id/src/lib/graphics
- Files:
-
- 10 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/new_class_id/src/lib/graphics/importer/md2/resource_md2.cc
r9825 r9847 7 7 8 8 ResourceMD2::ResourceMD2(const std::string& modelName, const std::string& skinName, float scale) 9 : NewResource(&ResourceMD2::type)9 : Resource(&ResourceMD2::type) 10 10 { 11 11 Resources::StorePointer* ptr = this->acquireResource(loadString(modelName, skinName, scale)); … … 19 19 { 20 20 PRINTF(0)("NOT FOUND MD2: %s\n", modelName.c_str()); 21 std::string modelFileName = this-> NewResource::locateFile(modelName);22 //std::string skinFileName = this-> NewResource::locateFile(skinName);21 std::string modelFileName = this->Resource::locateFile(modelName); 22 //std::string skinFileName = this->Resource::locateFile(skinName); 23 23 this->MD2Model::load(modelFileName, skinName, scale); 24 this-> NewResource::addResource(new ResourceMD2::MD2ResourcePointer(loadString(modelName, skinName, scale), Resources::KeepLevel(0), this->MD2Model::dataPointer()));24 this->Resource::addResource(new ResourceMD2::MD2ResourcePointer(loadString(modelName, skinName, scale), Resources::KeepLevel(0), this->MD2Model::dataPointer())); 25 25 } 26 26 -
branches/new_class_id/src/lib/graphics/importer/md2/resource_md2.h
r9846 r9847 12 12 13 13 14 class ResourceMD2 : public MD2Model, public Resources:: NewResource14 class ResourceMD2 : public MD2Model, public Resources::Resource 15 15 { 16 16 public: -
branches/new_class_id/src/lib/graphics/importer/resource_obj.cc
r9831 r9847 7 7 8 8 ResourceOBJ::ResourceOBJ(const std::string& imageName, float scaling) 9 : NewResource(&ResourceOBJ::type)9 : Resource(&ResourceOBJ::type) 10 10 { 11 11 Resources::StorePointer* ptr = this->acquireResource(imageName + ',' + MultiType(scaling).getString()); … … 19 19 { 20 20 PRINTF(5)("NOT FOUND OBJ: %s\n", imageName.c_str()); 21 std::string fileName = this-> NewResource::locateFile(imageName);21 std::string fileName = this->Resource::locateFile(imageName); 22 22 this->acquireData(OBJModel(fileName, scaling).dataPointer()); 23 this-> NewResource::addResource(new ResourceOBJ::OBJResourcePointer(imageName + ',' + MultiType(scaling).getString(), Resources::KeepLevel(0), this->StaticModel::dataPointer()));23 this->Resource::addResource(new ResourceOBJ::OBJResourcePointer(imageName + ',' + MultiType(scaling).getString(), Resources::KeepLevel(0), this->StaticModel::dataPointer())); 24 24 } 25 25 } -
branches/new_class_id/src/lib/graphics/importer/resource_obj.h
r9846 r9847 11 11 #include "objModel.h" 12 12 13 class ResourceOBJ : public StaticModel, public Resources:: NewResource13 class ResourceOBJ : public StaticModel, public Resources::Resource 14 14 { 15 15 public: -
branches/new_class_id/src/lib/graphics/importer/resource_texture.cc
r9842 r9847 7 7 8 8 ResourceTexture::ResourceTexture(const std::string& imageName, GLenum target) 9 : NewResource(&ResourceTexture::type)9 : Resource(&ResourceTexture::type) 10 10 { 11 11 Resources::StorePointer* ptr = this->acquireResource(imageName + ',' + MultiType((int)target).getString()); … … 19 19 { 20 20 PRINTF(5)("NOT FOUND TEXTURE: %s\n", imageName.c_str()); 21 std::string fileName = this-> NewResource::locateFile(imageName);21 std::string fileName = this->Resource::locateFile(imageName); 22 22 this->Texture::loadImage(fileName, target); 23 this-> NewResource::addResource(new ResourceTexture::TextureResourcePointer(imageName + ',' + MultiType((int)target).getString(), Resources::KeepLevel(0), this->Texture::dataPointer()));23 this->Resource::addResource(new ResourceTexture::TextureResourcePointer(imageName + ',' + MultiType((int)target).getString(), Resources::KeepLevel(0), this->Texture::dataPointer())); 24 24 } 25 25 } -
branches/new_class_id/src/lib/graphics/importer/resource_texture.h
r9846 r9847 12 12 13 13 14 class ResourceTexture : public Texture, public Resources:: NewResource14 class ResourceTexture : public Texture, public Resources::Resource 15 15 { 16 16 public: -
branches/new_class_id/src/lib/graphics/resource_shader.cc
r9823 r9847 5 5 6 6 ResourceShader::ResourceShader(const std::string& vertexShaderName, const std::string& fragmentShaderName) 7 : NewResource(&ResourceShader::type)7 : Resource(&ResourceShader::type) 8 8 { 9 9 Resources::StorePointer* ptr = this->acquireResource(vertexShaderName +','+fragmentShaderName); … … 17 17 { 18 18 PRINTF(5)("NOT FOUND SHADER: %s\n", vertexShaderName.c_str()); 19 std::string vertexFileName = this-> NewResource::locateFile(vertexShaderName);19 std::string vertexFileName = this->Resource::locateFile(vertexShaderName); 20 20 std::string fragmentFileName; 21 21 if (!fragmentShaderName.empty()) 22 fragmentFileName = this-> NewResource::locateFile(fragmentShaderName);22 fragmentFileName = this->Resource::locateFile(fragmentShaderName); 23 23 24 24 this->Shader::load(vertexFileName, fragmentFileName); 25 this-> NewResource::addResource(new ResourceShader::ShaderResourcePointer(vertexShaderName+','+fragmentShaderName, Resources::KeepLevel(0), this->Shader::dataPointer()));25 this->Resource::addResource(new ResourceShader::ShaderResourcePointer(vertexShaderName+','+fragmentShaderName, Resources::KeepLevel(0), this->Shader::dataPointer())); 26 26 } 27 27 } -
branches/new_class_id/src/lib/graphics/resource_shader.h
r9846 r9847 12 12 13 13 14 class ResourceShader : public Shader, public Resources:: NewResource14 class ResourceShader : public Shader, public Resources::Resource 15 15 { 16 16 public: -
branches/new_class_id/src/lib/graphics/text_engine/resource_font.cc
r9839 r9847 7 7 8 8 ResourceFont::ResourceFont(const std::string& fontName, unsigned int renderSize) 9 : Font(), NewResource(&ResourceFont::type)9 : Font(), Resource(&ResourceFont::type) 10 10 { 11 11 assert(!fontName.empty()); … … 20 20 { 21 21 PRINTF(5)("NOT FOUND FONT: %s\n", fontName.c_str()); 22 std::string fileName = this-> NewResource::locateFile(fontName);22 std::string fileName = this->Resource::locateFile(fontName); 23 23 24 24 printf("FONTFILE %s TO %s\n", fontName.c_str(), fileName.c_str()); 25 25 26 26 this->Font::loadFontFromTTF(fileName, renderSize); 27 this-> NewResource::addResource(new ResourceFont::FontResourcePointer(fontName + ',' + MultiType((int)renderSize).getString(), Resources::KeepLevel(0), this->Font::dataPointer()));27 this->Resource::addResource(new ResourceFont::FontResourcePointer(fontName + ',' + MultiType((int)renderSize).getString(), Resources::KeepLevel(0), this->Font::dataPointer())); 28 28 } 29 29 } -
branches/new_class_id/src/lib/graphics/text_engine/resource_font.h
r9846 r9847 12 12 13 13 14 class ResourceFont : public Font, public Resources:: NewResource14 class ResourceFont : public Font, public Resources::Resource 15 15 { 16 16 public:
Note: See TracChangeset
for help on using the changeset viewer.