Audio module, simple text rendering

This commit is contained in:
MihailRis 2022-03-20 23:48:21 +03:00 • committed by GitHub
parent e96fd909ea
commit 1770acbfef
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
15 changed files with 702 additions and 17 deletions

View file

@ -2,6 +2,7 @@
#include "graphics/Texture.h"
#include "graphics/Shader.h"
#include "graphics/Font.h"
Assets::~Assets() {
for (auto& iter : shaders){
@ -11,6 +12,10 @@ Assets::~Assets() {
for (auto& iter : textures){
delete iter.second;
}
for (auto& iter : fonts){
delete iter.second;
}
}
Texture* Assets::getTexture(std::string name){
@ -29,3 +34,12 @@ Shader* Assets::getShader(std::string name){
void Assets::store(Shader* shader, std::string name){
shaders[name] = shader;
}
Font* Assets::getFont(std::string name){
return fonts[name];
}
void Assets::store(Font* font, std::string name){
fonts[name] = font;
}