mirror of
https://github.com/love2d/love.git
synced 2026-08-18 11:44:15 +02:00
vulkan: move shader compilation into Shader
This commit is contained in:
@@ -13,10 +13,13 @@
|
||||
namespace love {
|
||||
namespace graphics {
|
||||
namespace vulkan {
|
||||
class Shader final : public graphics::Shader {
|
||||
class Shader final : public graphics::Shader, public Volatile {
|
||||
public:
|
||||
Shader(StrongRef<love::graphics::ShaderStage> stages[]);
|
||||
virtual ~Shader() = default;
|
||||
virtual ~Shader();
|
||||
|
||||
bool loadVolatile() override;
|
||||
void unloadVolatile() override;
|
||||
|
||||
const std::vector<VkPipelineShaderStageCreateInfo>& getShaderStages() const {
|
||||
return shaderStages;
|
||||
@@ -44,6 +47,7 @@ namespace love {
|
||||
|
||||
private:
|
||||
std::vector<VkPipelineShaderStageCreateInfo> shaderStages;
|
||||
std::vector<VkShaderModule> shaderModules;
|
||||
|
||||
std::map<std::string, int> vertexAttributeIndices = {
|
||||
{ "VertexPosition", 0 },
|
||||
@@ -59,7 +63,7 @@ namespace love {
|
||||
{ "MainTex", 4 }
|
||||
};
|
||||
|
||||
|
||||
std::map<std::string, UniformInfo> uniforms;
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user