mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-06 19:41:51 +00:00
voxels renderer rebuilt, WorldFiles fix
This commit is contained in:
parent
0576316282
commit
754c5b80d0
44 changed files with 1141 additions and 524 deletions
|
|
@ -18,8 +18,11 @@ Assets::~Assets() {
|
|||
}
|
||||
}
|
||||
|
||||
Texture* Assets::getTexture(std::string name){
|
||||
return textures[name];
|
||||
Texture* Assets::getTexture(std::string name) const {
|
||||
auto found = textures.find(name);
|
||||
if (found == textures.end())
|
||||
return nullptr;
|
||||
return found->second;
|
||||
}
|
||||
|
||||
void Assets::store(Texture* texture, std::string name){
|
||||
|
|
@ -27,8 +30,11 @@ void Assets::store(Texture* texture, std::string name){
|
|||
}
|
||||
|
||||
|
||||
Shader* Assets::getShader(std::string name){
|
||||
return shaders[name];
|
||||
Shader* Assets::getShader(std::string name) const{
|
||||
auto found = shaders.find(name);
|
||||
if (found == shaders.end())
|
||||
return nullptr;
|
||||
return found->second;
|
||||
}
|
||||
|
||||
void Assets::store(Shader* shader, std::string name){
|
||||
|
|
@ -36,8 +42,11 @@ void Assets::store(Shader* shader, std::string name){
|
|||
}
|
||||
|
||||
|
||||
Font* Assets::getFont(std::string name){
|
||||
return fonts[name];
|
||||
Font* Assets::getFont(std::string name) const {
|
||||
auto found = fonts.find(name);
|
||||
if (found == fonts.end())
|
||||
return nullptr;
|
||||
return found->second;
|
||||
}
|
||||
|
||||
void Assets::store(Font* font, std::string name){
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue