2022-09-02 11:06:59 +00:00
|
|
|
#pragma once
|
|
|
|
|
2022-09-07 09:02:01 +00:00
|
|
|
#include "engine_api.h"
|
2022-09-02 23:02:09 +00:00
|
|
|
|
2022-09-02 11:06:59 +00:00
|
|
|
#include "resource.hpp"
|
|
|
|
|
|
|
|
#include <glm/mat4x4.hpp>
|
|
|
|
|
|
|
|
#include <string>
|
|
|
|
#include <map>
|
|
|
|
|
2022-10-27 22:06:56 +00:00
|
|
|
namespace engine::gfx {
|
2022-10-31 16:21:07 +00:00
|
|
|
struct Pipeline;
|
2022-10-27 22:06:56 +00:00
|
|
|
}
|
|
|
|
|
2022-10-06 10:30:44 +00:00
|
|
|
namespace engine::resources {
|
2022-09-02 11:06:59 +00:00
|
|
|
|
2022-09-03 04:56:51 +00:00
|
|
|
class ENGINE_API Shader : public Resource {
|
2022-09-02 11:06:59 +00:00
|
|
|
|
|
|
|
public:
|
|
|
|
Shader(const std::filesystem::path& resPath);
|
|
|
|
~Shader() override;
|
|
|
|
|
2022-10-27 22:06:56 +00:00
|
|
|
struct UniformBuffer {
|
2022-10-31 16:21:07 +00:00
|
|
|
glm::mat4 v;
|
|
|
|
glm::mat4 p;
|
2022-09-02 11:06:59 +00:00
|
|
|
};
|
|
|
|
|
2022-10-27 22:06:56 +00:00
|
|
|
gfx::Pipeline* getPipeline()
|
2022-09-02 11:06:59 +00:00
|
|
|
{
|
2022-10-27 22:06:56 +00:00
|
|
|
return m_pipeline;
|
2022-09-02 11:06:59 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
private:
|
2022-10-27 22:06:56 +00:00
|
|
|
gfx::Pipeline* m_pipeline = nullptr;
|
2022-09-02 11:06:59 +00:00
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
}
|