light/modules/engine/include/engine/platform/graphics/opengl/shader.hpp

28 lines
547 B
C++
Raw Normal View History

2021-05-27 19:54:05 +04:30
#pragma once
2025-07-05 13:28:41 +03:30
#include <engine/base/base.hpp>
#include <engine/graphics/shader.hpp>
#include <engine/utils/file_manager.hpp>
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_shader_id;
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;
2022-03-04 22:40:20 +03:30
private:
// shaderc::SpvCompilationResult CompileGLSL(BasicFileHandle file, Shader::Stage stage);
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