Add proper support for IndexType and uint32 indices

This commit is contained in:
SirLynix
2022-04-04 09:02:00 +02:00
parent 66ff6cfa81
commit 9d526741b9
34 changed files with 188 additions and 57 deletions

View File

@@ -23,13 +23,14 @@ namespace Nz
class RenderSubmesh : public RenderElement
{
public:
inline RenderSubmesh(int renderLayer, std::shared_ptr<MaterialPass> materialPass, std::shared_ptr<RenderPipeline> renderPipeline, const WorldInstance& worldInstance, std::size_t indexCount, std::shared_ptr<RenderBuffer> indexBuffer, std::shared_ptr<RenderBuffer> vertexBuffer, const Recti& scissorBox);
inline RenderSubmesh(int renderLayer, std::shared_ptr<MaterialPass> materialPass, std::shared_ptr<RenderPipeline> renderPipeline, const WorldInstance& worldInstance, std::size_t indexCount, IndexType indexType, std::shared_ptr<RenderBuffer> indexBuffer, std::shared_ptr<RenderBuffer> vertexBuffer, const Recti& scissorBox);
~RenderSubmesh() = default;
inline UInt64 ComputeSortingScore(const Frustumf& frustum, const RenderQueueRegistry& registry) const override;
inline const RenderBuffer* GetIndexBuffer() const;
inline std::size_t GetIndexCount() const;
inline IndexType GetIndexType() const;
inline const MaterialPass& GetMaterialPass() const;
inline const RenderPipeline* GetRenderPipeline() const;
inline const Recti& GetScissorBox() const;
@@ -45,6 +46,7 @@ namespace Nz
std::shared_ptr<RenderPipeline> m_renderPipeline;
std::size_t m_indexCount;
const WorldInstance& m_worldInstance;
IndexType m_indexType;
Recti m_scissorBox;
int m_renderLayer;
};