light/modules/renderer/include/renderer/shader.hpp

40 lines
500 B
C++
Raw Normal View History

2025-07-05 13:28:41 +03:30
#pragma once
#include <asset_parser/assets/text.hpp>
2025-07-05 13:28:41 +03:30
#include <glm/glm.hpp>
namespace Light {
class SharedContext;
class Shader
{
public:
enum Stage
{
none = 0,
vertex,
pixel,
geometry,
2025-07-05 13:28:41 +03:30
};
2025-07-06 14:02:50 +03:30
static auto create(
Assets::Blob vertex_blob,
Assets::Blob pixel_blob,
const Ref<SharedContext> &shared_context
2025-07-06 14:02:50 +03:30
) -> Ref<Shader>;
2025-07-05 13:28:41 +03:30
virtual ~Shader() = default;
virtual void bind() = 0;
2025-07-05 16:07:51 +03:30
virtual void un_bind() = 0;
2025-07-05 13:28:41 +03:30
protected:
Shader() = default;
};
} // namespace Light