Graphics: Separate pipeline state from Material into a new class, MaterialPipeline
This allows much more efficient batching, along with pipeline reusage and preparation for the Vulkan API Former-commit-id: fd2de2f0e9612ea275ee69c5578c68e7169cd05b [formerly 53bd8a5ed5695311b7543ad717df63f93fad2da6] [formerly 171740929652ac9fe30e84983709388859cedd6b [formerly 25096a76678f1052e76f67d26b458077a0632cc3]] Former-commit-id: 7978dbeb87af2eac9e5501a97afa83849648bf6e [formerly 81b6cce1ee81a2ca8873d3c70d468b2c71510c95] Former-commit-id: 6663e2721c3f79d5f1e3f33c6183174378b502f4
This commit is contained in:
42
include/Nazara/Renderer/RenderPipeline.hpp
Normal file
42
include/Nazara/Renderer/RenderPipeline.hpp
Normal file
@@ -0,0 +1,42 @@
|
||||
// Copyright (C) 2016 Jérôme Leclercq
|
||||
// This file is part of the "Nazara Engine - Renderer module"
|
||||
// For conditions of distribution and use, see copyright notice in Config.hpp
|
||||
|
||||
#pragma once
|
||||
|
||||
#ifndef NAZARA_RENDERPIPELINE_HPP
|
||||
#define NAZARA_RENDERPIPELINE_HPP
|
||||
|
||||
#include <Nazara/Utility/Enums.hpp>
|
||||
#include <Nazara/Renderer/RenderStates.hpp>
|
||||
#include <Nazara/Renderer/Shader.hpp>
|
||||
|
||||
namespace Nz
|
||||
{
|
||||
struct RenderPipelineInfo : RenderStates
|
||||
{
|
||||
ShaderConstRef shader;
|
||||
};
|
||||
|
||||
class RenderPipeline
|
||||
{
|
||||
public:
|
||||
inline RenderPipeline();
|
||||
inline ~RenderPipeline();
|
||||
|
||||
inline bool Create(const RenderPipelineInfo& pipelineInfo);
|
||||
inline void Destroy();
|
||||
|
||||
inline const RenderPipelineInfo& GetInfo() const;
|
||||
|
||||
inline bool IsValid() const;
|
||||
|
||||
private:
|
||||
RenderPipelineInfo m_pipelineInfo;
|
||||
bool m_valid;
|
||||
};
|
||||
}
|
||||
|
||||
#include <Nazara/Renderer/RenderPipeline.inl>
|
||||
|
||||
#endif // NAZARA_RENDERPIPELINE_HPP
|
||||
Reference in New Issue
Block a user