Add 2D Batch renderer
This commit is contained in:
@@ -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);
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user