mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-04 18:41:51 +00:00
Audio module, simple text rendering
This commit is contained in:
parent
e96fd909ea
commit
1770acbfef
15 changed files with 702 additions and 17 deletions
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue