cleanup
This commit is contained in:
32
src/Assets.h
Executable file
32
src/Assets.h
Executable file
@@ -0,0 +1,32 @@
|
||||
#ifndef ASSETS_H
|
||||
#define ASSETS_H
|
||||
|
||||
#include <map>
|
||||
#include <string>
|
||||
|
||||
#include <GL/glew.h>
|
||||
|
||||
#include "Texture.h"
|
||||
#include "Shader.h"
|
||||
|
||||
class Assets {
|
||||
private:
|
||||
std::map<std::string, Texture2D> textures;
|
||||
std::map<std::string, Shader> shaders;
|
||||
|
||||
Texture2D loadTextureFromFile(const GLchar *file, GLboolean alpha);
|
||||
Shader loadShaderFromFile(const GLchar *vShaderFile,const GLchar *fShaderFile, const GLchar *gShaderFile=nullptr);
|
||||
|
||||
public:
|
||||
Assets() {}
|
||||
~Assets();
|
||||
|
||||
Shader loadShader(const GLchar *vShaderFile, const GLchar *fShaderFile, const GLchar *gShaderFile, std::string name);
|
||||
Shader getShader(std::string name);
|
||||
Texture2D loadTexture(const GLchar *file, GLboolean alpha, std::string name);
|
||||
Texture2D getTexture(std::string name);
|
||||
|
||||
|
||||
};
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user