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

27 lines
451 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
{
public:
2025-07-05 16:07:51 +03:30
glShader(BasicFileHandle vertexFile, BasicFileHandle pixelFile);
2022-03-04 22:40:20 +03:30
~glShader();
2021-05-27 19:54:05 +04:30
void bind() override;
2025-07-05 16:07:51 +03:30
void un_bind() override;
2022-03-04 22:40:20 +03:30
private:
unsigned int compile_shader(std::string source, Shader::Stage stage);
2025-07-05 16:07:51 +03:30
unsigned int m_shader_id;
2022-03-04 22:40:20 +03:30
};
2021-05-27 19:54:05 +04:30
2022-03-04 22:40:20 +03:30
} // namespace Light