71 lines
1.7 KiB
C++
71 lines
1.7 KiB
C++
#include "resourcebase.h"
|
|
|
|
ResourceBase::DataBase<Texture> ResourceBase::textures;
|
|
ResourceBase::DataBase<Mesh> ResourceBase::meshes;
|
|
ResourceBase::DataBase<Material> ResourceBase::materials;
|
|
ResourceBase::DataBase<Shader> ResourceBase::shaders;
|
|
ResourceBase::DataBase<Entity> ResourceBase::entities;
|
|
ResourceBase::DataBase<Lights> ResourceBase::lights;
|
|
|
|
void ResourceBase::setTexture(const std::string &textureName, Texture* myTexture)
|
|
{
|
|
textures.add(textureName, myTexture);
|
|
}
|
|
|
|
void ResourceBase::setMesh(const std::string &meshName, Mesh* myMesh )
|
|
{
|
|
meshes.add(meshName, myMesh);
|
|
}
|
|
|
|
void ResourceBase::setMaterial(const std::string &materialName, Material* myMaterial)
|
|
{
|
|
materials.add(materialName, myMaterial);
|
|
}
|
|
|
|
void ResourceBase::setShader(const std::string &shaderName, Shader* myShader)
|
|
{
|
|
shaders.add(shaderName, myShader);
|
|
}
|
|
|
|
void ResourceBase::setEntity(const std::string &entityName, Entity* myEntity)
|
|
{
|
|
entities.add(entityName, myEntity);
|
|
}
|
|
|
|
void ResourceBase::setLights(const std::string &lightsName, Lights* myLights)
|
|
{
|
|
lights.add(lightsName, myLights);
|
|
}
|
|
|
|
|
|
Texture* ResourceBase::getTexture(const std::string &textureName)
|
|
{
|
|
return textures.get(textureName);
|
|
}
|
|
|
|
Mesh* ResourceBase::getMesh(const std::string &meshName)
|
|
{
|
|
return meshes.get(meshName);
|
|
}
|
|
|
|
Material* ResourceBase::getMaterial(const std::string &materialName)
|
|
{
|
|
return materials.get(materialName);
|
|
}
|
|
|
|
Shader* ResourceBase::getShader(const std::string &shaderName)
|
|
{
|
|
return shaders.get(shaderName);
|
|
}
|
|
|
|
Entity* ResourceBase::getEntity(const std::string &entityName)
|
|
{
|
|
return entities.get(entityName);
|
|
}
|
|
|
|
Lights* ResourceBase::getLights(const std::string &lightsName)
|
|
{
|
|
return lights.get(lightsName);
|
|
}
|
|
|