Graphics: Add DebugDrawer support

This commit is contained in:
SirLynix
2022-08-17 20:12:49 +02:00
parent 4a5f866754
commit f1549b934c
11 changed files with 156 additions and 9 deletions

View File

@@ -0,0 +1,50 @@
// Copyright (C) 2022 Jérôme "Lynix" Leclercq (lynix680@gmail.com)
// This file is part of the "Nazara Engine - Graphics module"
// For conditions of distribution and use, see copyright notice in Config.hpp
#pragma once
#ifndef NAZARA_GRAPHICS_DEBUGDRAWPIPELINEPASS_HPP
#define NAZARA_GRAPHICS_DEBUGDRAWPIPELINEPASS_HPP
#include <Nazara/Prerequisites.hpp>
#include <Nazara/Graphics/Config.hpp>
#include <Nazara/Graphics/ElementRenderer.hpp>
#include <Nazara/Graphics/FramePipelinePass.hpp>
#include <Nazara/Graphics/MaterialPass.hpp>
#include <Nazara/Graphics/RenderElement.hpp>
#include <Nazara/Graphics/RenderQueue.hpp>
#include <Nazara/Graphics/RenderQueueRegistry.hpp>
#include <Nazara/Math/Frustum.hpp>
namespace Nz
{
class AbstractViewer;
class FrameGraph;
class FramePipeline;
class Material;
class NAZARA_GRAPHICS_API DebugDrawPipelinePass : public FramePipelinePass
{
public:
DebugDrawPipelinePass(FramePipeline& owner, AbstractViewer* viewer);
DebugDrawPipelinePass(const DebugDrawPipelinePass&) = delete;
DebugDrawPipelinePass(DebugDrawPipelinePass&&) = delete;
~DebugDrawPipelinePass() = default;
void Prepare(RenderFrame& renderFrame);
void RegisterToFrameGraph(FrameGraph& frameGraph, std::size_t inputColorBufferIndex, std::size_t outputColorBufferIndex);
DepthPipelinePass& operator=(const DepthPipelinePass&) = delete;
DepthPipelinePass& operator=(DepthPipelinePass&&) = delete;
private:
AbstractViewer* m_viewer;
FramePipeline& m_pipeline;
};
}
#include <Nazara/Graphics/DebugDrawPipelinePass.inl>
#endif // NAZARA_GRAPHICS_DEBUGDRAWPIPELINEPASS_HPP