Add Drawlist Vertex and Indexcount geteter (for debugging usage only)
This commit is contained in:
@@ -43,6 +43,18 @@ class PD_API Drawlist {
|
|||||||
void Optimize();
|
void Optimize();
|
||||||
void Clear();
|
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 Allocation */
|
||||||
Command& NewCommand();
|
Command& NewCommand();
|
||||||
bool HasCommands() { return pCommands.size() > 0; }
|
bool HasCommands() { return pCommands.size() > 0; }
|
||||||
|
|||||||
+2
-2
@@ -52,8 +52,8 @@ PD_API void UI7::IO::Update() {
|
|||||||
DrawlistRegestry.push_front(std::make_pair("CtxBackList", &Back));
|
DrawlistRegestry.push_front(std::make_pair("CtxBackList", &Back));
|
||||||
if (Font) ItemRowHeight = FontScale * Font->PixelHeight;
|
if (Font) ItemRowHeight = FontScale * Font->PixelHeight;
|
||||||
// RegisterDrawList("CtxBackList", Back);
|
// RegisterDrawList("CtxBackList", Back);
|
||||||
NumIndices = 0; // FDL.pNumIndices;
|
NumIndices = FDL.GetNumIndices();
|
||||||
NumVertices = 0; // FDL.pNumVertices;
|
NumVertices = FDL.GetNumVertices();
|
||||||
LabelPool.ResetFast();
|
LabelPool.ResetFast();
|
||||||
DynObjPool.ResetFast();
|
DynObjPool.ResetFast();
|
||||||
ImagePool.ResetFast();
|
ImagePool.ResetFast();
|
||||||
|
|||||||
Reference in New Issue
Block a user