2020-06-02 11:46:18 +02:00
|
|
|
#pragma once
|
2021-11-14 20:36:53 +01:00
|
|
|
#include "GraphicsEnums.h"
|
2020-06-02 11:46:18 +02:00
|
|
|
|
|
|
|
|
namespace Seele
|
|
|
|
|
{
|
2021-04-01 16:40:14 +02:00
|
|
|
DECLARE_REF(VertexShaderInput)
|
2023-01-21 18:43:21 +01:00
|
|
|
DECLARE_REF(MaterialInterface)
|
2021-04-01 16:40:14 +02:00
|
|
|
DECLARE_NAME_REF(Gfx, VertexBuffer)
|
|
|
|
|
DECLARE_NAME_REF(Gfx, IndexBuffer)
|
|
|
|
|
DECLARE_NAME_REF(Gfx, UniformBuffer)
|
2020-06-02 11:46:18 +02:00
|
|
|
struct MeshBatchElement
|
|
|
|
|
{
|
|
|
|
|
public:
|
|
|
|
|
Gfx::PIndexBuffer indexBuffer;
|
|
|
|
|
|
2023-01-21 18:43:21 +01:00
|
|
|
uint32 sceneDataIndex;
|
2020-06-02 11:46:18 +02:00
|
|
|
uint32 firstIndex;
|
|
|
|
|
uint32 numPrimitives;
|
|
|
|
|
|
|
|
|
|
uint32 numInstances;
|
|
|
|
|
uint32 baseVertexIndex;
|
|
|
|
|
uint32 minVertexIndex;
|
|
|
|
|
uint32 maxVertexIndex;
|
|
|
|
|
|
|
|
|
|
uint8 isInstanced : 1;
|
|
|
|
|
Gfx::PVertexBuffer indirectArgsBuffer;
|
2021-11-14 20:36:53 +01:00
|
|
|
MeshBatchElement();
|
2020-06-02 11:46:18 +02:00
|
|
|
};
|
|
|
|
|
struct MeshBatch
|
|
|
|
|
{
|
2022-11-15 12:19:11 +01:00
|
|
|
Array<MeshBatchElement> elements;
|
2020-06-02 11:46:18 +02:00
|
|
|
|
|
|
|
|
uint8 useReverseCulling : 1;
|
|
|
|
|
uint8 isBackfaceCullingDisabled : 1;
|
|
|
|
|
uint8 isCastingShadow : 1;
|
|
|
|
|
uint8 useWireframe : 1;
|
|
|
|
|
|
2020-06-08 01:44:47 +02:00
|
|
|
Gfx::SePrimitiveTopology topology;
|
2020-06-02 11:46:18 +02:00
|
|
|
|
2020-08-06 00:54:43 +02:00
|
|
|
PVertexShaderInput vertexInput;
|
2020-06-02 11:46:18 +02:00
|
|
|
|
2023-01-21 18:43:21 +01:00
|
|
|
PMaterialInterface material;
|
2020-06-02 11:46:18 +02:00
|
|
|
|
2021-11-14 20:36:53 +01:00
|
|
|
MeshBatch();
|
2022-01-12 14:40:26 +01:00
|
|
|
MeshBatch(const MeshBatch& other) = default;
|
|
|
|
|
MeshBatch(MeshBatch&& other) = default;
|
|
|
|
|
MeshBatch& operator=(const MeshBatch& other) = default;
|
|
|
|
|
MeshBatch& operator=(MeshBatch&& other) = default;
|
2020-06-02 11:46:18 +02:00
|
|
|
};
|
|
|
|
|
struct StaticMeshBatch : public MeshBatch
|
|
|
|
|
{
|
|
|
|
|
uint32 index;
|
|
|
|
|
};
|
|
|
|
|
} // namespace Seele
|