ShaderAst: Big refactor + add binding/location support
This commit is contained in:
@@ -8,24 +8,22 @@
|
||||
#define NAZARA_SHADERWRITER_HPP
|
||||
|
||||
#include <Nazara/Prerequisites.hpp>
|
||||
#include <Nazara/Core/String.hpp>
|
||||
#include <Nazara/Renderer/Config.hpp>
|
||||
#include <Nazara/Renderer/ShaderVisitor.hpp>
|
||||
#include <string>
|
||||
|
||||
namespace Nz
|
||||
{
|
||||
class NAZARA_RENDERER_API ShaderWriter : public ShaderVisitor
|
||||
class ShaderAst;
|
||||
|
||||
class NAZARA_RENDERER_API ShaderWriter
|
||||
{
|
||||
public:
|
||||
ShaderWriter() = default;
|
||||
ShaderWriter(const ShaderWriter&) = delete;
|
||||
ShaderWriter(ShaderWriter&&) = delete;
|
||||
~ShaderWriter() = default;
|
||||
virtual ~ShaderWriter();
|
||||
|
||||
virtual Nz::String Generate(const ShaderAst::StatementPtr& node) = 0;
|
||||
|
||||
virtual void RegisterFunction(const String& name, ShaderAst::StatementPtr node, std::initializer_list<ShaderAst::NamedVariablePtr> parameters, ShaderAst::ExpressionType ret) = 0;
|
||||
virtual void RegisterVariable(ShaderAst::VariableType kind, const String& name, ShaderAst::ExpressionType type) = 0;
|
||||
virtual std::string Generate(const ShaderAst& shader) = 0;
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user