fixing put pixel, adding scene change checker

This commit is contained in:
2024-10-21 01:48:01 +02:00
parent 4f755f8a6f
commit 0304834008
28 changed files with 302 additions and 201 deletions

View File

@@ -1,13 +1,17 @@
#ifndef __MLX_SHADER__
#define __MLX_SHADER__
#include <Renderer/Enums.h>
namespace mlx
{
struct ShaderSetLayout
{
std::vector<std::pair<int, VkDescriptorType> > binds;
std::vector<std::pair<int, VkDescriptorType>> binds;
ShaderSetLayout(std::vector<std::pair<int, VkDescriptorType> > b) : binds(std::move(b)) {}
inline bool operator==(const ShaderSetLayout& rhs) const { return binds == rhs.binds; }
};
struct ShaderPushConstantLayout
@@ -20,19 +24,12 @@ namespace mlx
struct ShaderLayout
{
std::vector<std::pair<int, ShaderSetLayout> > set_layouts;
std::vector<std::pair<int, ShaderSetLayout>> set_layouts;
std::vector<ShaderPushConstantLayout> push_constants;
ShaderLayout(std::vector<std::pair<int, ShaderSetLayout> > s, std::vector<ShaderPushConstantLayout> pc) : set_layouts(std::move(s)), push_constants(std::move(pc)) {}
};
enum class ShaderType
{
Vertex,
Fragment,
Compute
};
struct ShaderPipelineLayoutPart
{
std::vector<VkPushConstantRange> push_constants;