2021-05-27 19:54:05 +04:30
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include "Graphics/Shader.h"
|
|
|
|
|
2021-07-29 17:12:13 +04:30
|
|
|
#include "Base/Base.h"
|
2021-07-05 01:59:18 +04:30
|
|
|
|
2021-09-13 12:17:26 +04:30
|
|
|
#include <ShaderConductor/ShaderConductor.hpp>
|
|
|
|
|
2021-05-27 19:54:05 +04:30
|
|
|
namespace Light {
|
|
|
|
|
|
|
|
class glShader : public Shader
|
|
|
|
{
|
|
|
|
private:
|
|
|
|
unsigned int m_ShaderID;
|
|
|
|
|
|
|
|
public:
|
2021-09-13 12:17:26 +04:30
|
|
|
glShader(const std::vector<uint8_t>& vertexBlob, const std::vector<uint8_t>& pixelBlob, const std::string& vertexFileName, const std::string& pixelFileName);
|
2021-05-27 19:54:05 +04:30
|
|
|
~glShader();
|
|
|
|
|
|
|
|
void Bind() override;
|
|
|
|
void UnBind() override;
|
2021-09-13 12:17:26 +04:30
|
|
|
|
|
|
|
private:
|
|
|
|
ShaderConductor::Compiler::ResultDesc CompileHLSL(std::vector<uint8_t> blob, std::string fileName, Shader::Stage stage);
|
|
|
|
|
|
|
|
unsigned int CompileShader(const std::string& source, Shader::Stage stage);
|
2021-05-27 19:54:05 +04:30
|
|
|
};
|
|
|
|
|
|
|
|
}
|