Add 2D Batch renderer

This commit is contained in:
Thraix
2023-03-08 12:05:57 +01:00
parent c975ed2674
commit 796de92a56
21 changed files with 439 additions and 48 deletions
@@ -18,4 +18,10 @@ namespace Copium
{
vkCmdDrawIndexed(commandBuffer, indexCount, 1, 0, 0, 0);
}
void IndexBuffer::Draw(const CommandBuffer& commandBuffer, int indices)
{
CP_ASSERT(indices >= 0 && indices < indexCount, "Draw : amount of indices is out of range");
vkCmdDrawIndexed(commandBuffer, indices, 1, 0, 0, 0);
}
}
@@ -17,5 +17,6 @@ namespace Copium
void Bind(const CommandBuffer& commandBuffer);
void Draw(const CommandBuffer& commandBuffer);
void Draw(const CommandBuffer& commandBuffer, int indices);
};
}