2020-06-02 11:46:18 +02:00
|
|
|
#pragma once
|
|
|
|
|
#include "MinimalEngine.h"
|
|
|
|
|
#include "Scene/Scene.h"
|
|
|
|
|
#include "Graphics/GraphicsResources.h"
|
|
|
|
|
#include "Graphics/MeshBatch.h"
|
|
|
|
|
|
|
|
|
|
namespace Seele
|
|
|
|
|
{
|
|
|
|
|
class MeshProcessor
|
|
|
|
|
{
|
|
|
|
|
public:
|
|
|
|
|
MeshProcessor(const PScene scene, Gfx::PGraphics graphics);
|
|
|
|
|
virtual ~MeshProcessor();
|
2020-08-06 00:54:43 +02:00
|
|
|
protected:
|
2020-06-02 11:46:18 +02:00
|
|
|
PScene scene;
|
|
|
|
|
Gfx::PGraphics graphics;
|
|
|
|
|
virtual void addMeshBatch(
|
|
|
|
|
const MeshBatch& meshBatch,
|
2020-10-03 11:00:10 +02:00
|
|
|
// const PPrimitiveComponent primitiveComponent,
|
2020-08-06 00:54:43 +02:00
|
|
|
const Gfx::PRenderPass renderPass,
|
2020-10-03 11:00:10 +02:00
|
|
|
Gfx::PPipelineLayout pipelineLayout,
|
|
|
|
|
Gfx::PDescriptorLayout primitiveLayout,
|
2020-10-14 01:49:43 +02:00
|
|
|
Array<Gfx::PDescriptorSet>& descriptorSets,
|
2020-06-02 11:46:18 +02:00
|
|
|
int32 staticMeshId = -1) = 0;
|
2020-06-08 01:44:47 +02:00
|
|
|
void buildMeshDrawCommand(
|
2020-06-02 11:46:18 +02:00
|
|
|
const MeshBatch& meshBatch,
|
2020-10-03 11:00:10 +02:00
|
|
|
// const PPrimitiveComponent primitiveComponent,
|
2020-06-08 01:44:47 +02:00
|
|
|
const Gfx::PRenderPass renderPass,
|
2020-10-03 11:00:10 +02:00
|
|
|
Gfx::PPipelineLayout pipelineLayout,
|
2020-06-08 01:44:47 +02:00
|
|
|
Gfx::PRenderCommand drawCommand,
|
2020-10-14 01:49:43 +02:00
|
|
|
const Array<Gfx::PDescriptorSet>& descriptors,
|
2020-06-02 11:46:18 +02:00
|
|
|
Gfx::PVertexShader vertexShader,
|
|
|
|
|
Gfx::PControlShader controlShader,
|
|
|
|
|
Gfx::PEvaluationShader evaluationShader,
|
|
|
|
|
Gfx::PGeometryShader geometryShader,
|
|
|
|
|
Gfx::PFragmentShader fragmentShader,
|
|
|
|
|
bool positionOnly);
|
|
|
|
|
};
|
|
|
|
|
} // namespace Seele
|