33 lines
754 B
C++
Executable File
33 lines
754 B
C++
Executable File
#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
|