light/Engine/src/Platform/GraphicsAPI/OpenGL/glShader.h

29 lines
662 B
C
Raw Normal View History

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"
#include <ShaderConductor/ShaderConductor.hpp>
2021-05-27 19:54:05 +04:30
namespace Light {
class glShader : public Shader
{
private:
unsigned int m_ShaderID;
public:
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;
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
};
}