Redo of render paths
This commit is contained in:
@@ -1,44 +1,22 @@
|
||||
#pragma once
|
||||
#include "MinimalEngine.h"
|
||||
#include "Asset/FileAsset.h"
|
||||
#include "Graphics/GraphicsResources.h"
|
||||
#include <nlohmann/json_fwd.hpp>
|
||||
#include "MaterialAsset.h"
|
||||
|
||||
namespace Seele
|
||||
{
|
||||
struct FloatExpression
|
||||
{
|
||||
float data;
|
||||
std::string name;
|
||||
uint32 location;
|
||||
};
|
||||
struct VectorExpression
|
||||
{
|
||||
Vector data;
|
||||
std::string name;
|
||||
uint32 location;
|
||||
};
|
||||
struct TextureExpression
|
||||
{
|
||||
Gfx::PTexture texture;
|
||||
std::string name;
|
||||
uint32 location;
|
||||
};
|
||||
DECLARE_NAME_REF(Gfx, GraphicsPipeline);
|
||||
DECLARE_NAME_REF(Gfx, PipelineLayout);
|
||||
class Material : public FileAsset
|
||||
|
||||
class Material : public MaterialAsset
|
||||
{
|
||||
public:
|
||||
Material();
|
||||
Material(const std::string &directory, const std::string &name);
|
||||
Material(const std::string &fullPath);
|
||||
~Material();
|
||||
void compile();
|
||||
Gfx::PGraphicsPipeline getPipeline();
|
||||
|
||||
inline std::string getMaterialName() const {return materialName;}
|
||||
private:
|
||||
Gfx::PGraphicsPipeline pipeline;
|
||||
Gfx::PPipelineLayout pipelineLayout;
|
||||
void compile();
|
||||
std::string materialName;
|
||||
friend class MaterialLoader;
|
||||
};
|
||||
DEFINE_REF(Material);
|
||||
} // namespace Seele
|
||||
Reference in New Issue
Block a user