Fix Vertex Alloc usage at Index Alloc
This commit is contained in:
@@ -24,7 +24,7 @@ class Command {
|
|||||||
FirstIndex = AllocateIndices(idx, (PD::ptr)this);
|
FirstIndex = AllocateIndices(idx, (PD::ptr)this);
|
||||||
IndexCountMax = idx;
|
IndexCountMax = idx;
|
||||||
} else {
|
} else {
|
||||||
ExpandVertices(idx, (PD::ptr)this);
|
ExpandIndices(idx, (PD::ptr)this);
|
||||||
IndexCountMax += idx;
|
IndexCountMax += idx;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -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 size_t AllocateIndices(size_t count, PD::ptr accessor);
|
||||||
PD_API bool ExpandVertices(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 PutVertex(size_t loc, const Vertex& vtx, PD::ptr accessor);
|
||||||
PD_API void PutIndex(size_t loc, u16 idx, PD::ptr accessor);
|
PD_API void PutIndex(size_t loc, u16 idx, PD::ptr accessor);
|
||||||
PD_API const Vertex& GetVertex(size_t loc);
|
PD_API const Vertex& GetVertex(size_t loc);
|
||||||
|
|||||||
@@ -28,9 +28,9 @@ PD_API bool ExpandVertices(size_t count, PD::ptr accessor) {
|
|||||||
return true;
|
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;
|
if (pIndexAccessor != accessor) return false;
|
||||||
pVtxPool.Allocate(count);
|
pIdxPool.Allocate(count);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -42,7 +42,6 @@ int main(int argc, char** argv) {
|
|||||||
PD::Li::Font font;
|
PD::Li::Font font;
|
||||||
font.LoadTTF(ResourcePath("default.ttf"));
|
font.LoadTTF(ResourcePath("default.ttf"));
|
||||||
pList.SetFont(&font);
|
pList.SetFont(&font);
|
||||||
pList.SetFontscale(0.7f);
|
|
||||||
while (pOs->Mainloop()) {
|
while (pOs->Mainloop()) {
|
||||||
pOs->ClearViewPort();
|
pOs->ClearViewPort();
|
||||||
PD::Li::ResetPools();
|
PD::Li::ResetPools();
|
||||||
|
|||||||
Reference in New Issue
Block a user