2021-05-27 19:54:05 +04:30
|
|
|
#pragma once
|
|
|
|
|
2022-03-08 21:19:19 +03:30
|
|
|
#include "Base/Base.hpp"
|
|
|
|
#include "Graphics/Shader.hpp"
|
|
|
|
#include "Utility/FileManager.hpp"
|
2021-10-02 08:51:54 +03:30
|
|
|
|
2022-03-04 22:40:20 +03:30
|
|
|
#include <shaderc/shaderc.hpp>
|
2021-09-13 12:17:26 +04:30
|
|
|
|
2021-05-27 19:54:05 +04:30
|
|
|
namespace Light {
|
|
|
|
|
2022-03-04 22:40:20 +03:30
|
|
|
class glShader: public Shader
|
|
|
|
{
|
|
|
|
private:
|
|
|
|
unsigned int m_ShaderID;
|
2021-05-27 19:54:05 +04:30
|
|
|
|
2022-03-04 22:40:20 +03:30
|
|
|
public:
|
|
|
|
glShader(BasicFileHandle vertexFile, BasicFileHandle pixelFile);
|
|
|
|
~glShader();
|
2021-05-27 19:54:05 +04:30
|
|
|
|
2022-03-04 22:40:20 +03:30
|
|
|
void Bind() override;
|
|
|
|
void UnBind() override;
|
2021-09-13 12:17:26 +04:30
|
|
|
|
2022-03-04 22:40:20 +03:30
|
|
|
private:
|
|
|
|
shaderc::SpvCompilationResult CompileGLSL(BasicFileHandle file, Shader::Stage stage);
|
2021-09-13 12:17:26 +04:30
|
|
|
|
2022-03-04 22:40:20 +03:30
|
|
|
unsigned int CompileShader(std::string source, Shader::Stage stage);
|
|
|
|
};
|
2021-05-27 19:54:05 +04:30
|
|
|
|
2022-03-04 22:40:20 +03:30
|
|
|
} // namespace Light
|