engine/include/resources/shader.hpp

38 lines
700 B
C++
Raw Normal View History

2022-12-20 23:51:04 +00:00
#pragma once
#include "gfx.hpp"
namespace engine {
class GFXDevice;
2023-03-13 17:10:46 +00:00
struct RenderData;
}
2022-12-20 23:51:04 +00:00
namespace engine::resources {
class Shader {
public:
2023-01-02 17:24:20 +00:00
// defines what vertex inputs are defined, position is always vec3
struct VertexParams {
2023-01-20 16:30:35 +00:00
bool hasNormal; // vec3
bool hasTangent; // vec3
bool hasColor; // vec3
bool hasUV0; // vec2
2023-01-02 17:24:20 +00:00
};
2023-03-13 17:10:46 +00:00
Shader(RenderData* renderData, const char* vertPath, const char* fragPath, const VertexParams& vertexParams, bool alphaBlending, bool cullBackFace);
~Shader();
2022-12-20 23:51:04 +00:00
Shader(const Shader&) = delete;
Shader& operator=(const Shader&) = delete;
const gfx::Pipeline* getPipeline();
2022-12-20 23:51:04 +00:00
private:
GFXDevice* const m_gfx;
const gfx::Pipeline* m_pipeline;
};
}