Formatted EVERYTHING

This commit is contained in:
Dynamitos
2024-06-09 12:20:53 +02:00
parent f18bf8acbe
commit d95dab850c
265 changed files with 8002 additions and 12310 deletions
+19 -19
View File
@@ -7,32 +7,32 @@ namespace Seele {
namespace Metal {
class Shader {
public:
Shader(PGraphics graphics, Gfx::SeShaderStageFlags stage);
virtual ~Shader();
public:
Shader(PGraphics graphics, Gfx::SeShaderStageFlags stage);
virtual ~Shader();
void create(const ShaderCreateInfo &createInfo);
void create(const ShaderCreateInfo& createInfo);
constexpr MTL::Function *getFunction() const { return function; }
constexpr const char *getEntryPointName() const {
// SLang renames all entry points to main, so we dont need that
return "main"; // entryPointName.c_str();
}
uint32 getShaderHash() const;
constexpr MTL::Function* getFunction() const { return function; }
constexpr const char* getEntryPointName() const {
// SLang renames all entry points to main, so we dont need that
return "main"; // entryPointName.c_str();
}
uint32 getShaderHash() const;
private:
Gfx::SeShaderStageFlags stage;
PGraphics graphics;
MTL::Library* library;
MTL::Function *function;
uint32 hash;
private:
Gfx::SeShaderStageFlags stage;
PGraphics graphics;
MTL::Library* library;
MTL::Function* function;
uint32 hash;
};
DEFINE_REF(Shader)
template <typename Base, Gfx::SeShaderStageFlags flags> class ShaderBase : public Base, public Shader {
public:
ShaderBase(PGraphics graphics) : Shader(graphics, flags) {}
virtual ~ShaderBase() {}
public:
ShaderBase(PGraphics graphics) : Shader(graphics, flags) {}
virtual ~ShaderBase() {}
};
using VertexShader = ShaderBase<Gfx::VertexShader, Gfx::SE_SHADER_STAGE_VERTEX_BIT>;
using FragmentShader = ShaderBase<Gfx::FragmentShader, Gfx::SE_SHADER_STAGE_FRAGMENT_BIT>;