Fix Vertex Alloc usage at Index Alloc

This commit is contained in:
2026-03-24 22:20:41 +01:00
parent 4777c85f9a
commit eea0e9844f
4 changed files with 4 additions and 5 deletions
+1 -1
View File
@@ -24,7 +24,7 @@ class Command {
FirstIndex = AllocateIndices(idx, (PD::ptr)this);
IndexCountMax = idx;
} else {
ExpandVertices(idx, (PD::ptr)this);
ExpandIndices(idx, (PD::ptr)this);
IndexCountMax += idx;
}
}
+1 -1
View File
@@ -16,7 +16,7 @@ PD_API size_t AllocateVertices(size_t count, PD::ptr accessor);
*/
PD_API size_t AllocateIndices(size_t count, PD::ptr accessor);
PD_API bool ExpandVertices(size_t count, PD::ptr accessor);
PD_API bool EcpandIndices(size_t count, PD::ptr accessor);
PD_API bool ExpandIndices(size_t count, PD::ptr accessor);
PD_API void PutVertex(size_t loc, const Vertex& vtx, PD::ptr accessor);
PD_API void PutIndex(size_t loc, u16 idx, PD::ptr accessor);
PD_API const Vertex& GetVertex(size_t loc);
+2 -2
View File
@@ -28,9 +28,9 @@ PD_API bool ExpandVertices(size_t count, PD::ptr accessor) {
return true;
}
PD_API bool EcpandIndices(size_t count, PD::ptr accessor) {
PD_API bool ExpandIndices(size_t count, PD::ptr accessor) {
if (pIndexAccessor != accessor) return false;
pVtxPool.Allocate(count);
pIdxPool.Allocate(count);
return true;
}
-1
View File
@@ -42,7 +42,6 @@ int main(int argc, char** argv) {
PD::Li::Font font;
font.LoadTTF(ResourcePath("default.ttf"));
pList.SetFont(&font);
pList.SetFontscale(0.7f);
while (pOs->Mainloop()) {
pOs->ClearViewPort();
PD::Li::ResetPools();