Add Drawlist Vertex and Indexcount geteter (for debugging usage only)

This commit is contained in:
2026-09-06 15:58:19 +02:00
parent 5a56bf3986
commit feeb3b1ba8
2 changed files with 14 additions and 2 deletions
+12
View File
@@ -43,6 +43,18 @@ class PD_API Drawlist {
void Optimize();
void Clear();
size_t GetNumVertices() const {
size_t count = 0;
for (const auto& cmd : pCommands) count += cmd.VertexCount;
return count;
}
size_t GetNumIndices() const {
size_t count = 0;
for (const auto& cmd : pCommands) count += cmd.IndexCount;
return count;
}
/** Command Allocation */
Command& NewCommand();
bool HasCommands() { return pCommands.size() > 0; }