Files
CDAG/Research/shaders/ShaderLoader.h

27 lines
770 B
C++

#pragma once
#include <string>
#include <map>
class ShaderLoader {
public:
static void Create();
static void Destroy();
static ShaderLoader* Instance();
unsigned LoadShader(const char* vertexFileName = "Shader.vert", const char* fragmentFileName = "Shader.frag", const std::map<std::string, std::string> additionalProperties = std::map<std::string, std::string>());
void SetShaderPath(std::string shaderPath);
std::string GetShaderPath();
protected:
private:
ShaderLoader();
~ShaderLoader();
void ParseProperties(std::string &line, char delimiter, const std::map<std::string, std::string> additionalProperties = std::map<std::string, std::string>());
static ShaderLoader* mInstance;
std::string mShaderPath;
bool verbose;
};