light/Engine/src/Platform/GraphicsAPI/OpenGL/glShader.hpp
2022-03-08 21:19:19 +03:30

29 lines
555 B
C++

#pragma once
#include "Base/Base.hpp"
#include "Graphics/Shader.hpp"
#include "Utility/FileManager.hpp"
#include <shaderc/shaderc.hpp>
namespace Light {
class glShader: public Shader
{
private:
unsigned int m_ShaderID;
public:
glShader(BasicFileHandle vertexFile, BasicFileHandle pixelFile);
~glShader();
void Bind() override;
void UnBind() override;
private:
shaderc::SpvCompilationResult CompileGLSL(BasicFileHandle file, Shader::Stage stage);
unsigned int CompileShader(std::string source, Shader::Stage stage);
};
} // namespace Light