Files
Seele/src/Engine/Graphics/RenderPass/MeshProcessor.h
T
2022-11-17 16:47:42 +01:00

44 lines
1.3 KiB
C++

#pragma once
#include "MinimalEngine.h"
#include "Scene/Scene.h"
#include "Graphics/GraphicsResources.h"
#include "Graphics/MeshBatch.h"
namespace Seele
{
class MeshProcessor
{
public:
MeshProcessor(Gfx::PGraphics graphics);
virtual ~MeshProcessor();
Array<Gfx::PRenderCommand> getRenderCommands();
void clearCommands();
protected:
PScene scene;
Gfx::PGraphics graphics;
virtual void processMeshBatch(
const MeshBatch& batch,
Gfx::PViewport target,
Gfx::PRenderPass renderPass,
Gfx::PPipelineLayout pipelineLayout,
Gfx::PDescriptorLayout primitiveLayout,
Array<Gfx::PDescriptorSet> descriptorSets,
int32 staticMeshId = -1) = 0;
void buildMeshDrawCommand(
const MeshBatch& meshBatch,
// const PPrimitiveComponent primitiveComponent,
const Gfx::PRenderPass renderPass,
Gfx::PPipelineLayout pipelineLayout,
Gfx::PRenderCommand drawCommand,
const Array<Gfx::PDescriptorSet>& descriptors,
Gfx::PVertexShader vertexShader,
Gfx::PControlShader controlShader,
Gfx::PEvaluationShader evaluationShader,
Gfx::PGeometryShader geometryShader,
Gfx::PFragmentShader fragmentShader,
bool positionOnly);
std::mutex commandLock;
Array<Gfx::PRenderCommand> renderCommands;
};
} // namespace Seele