Files
palladium/include/pd/lithium/pools.hpp
T
tobid7 a86c13b9a3 Refactor PD::Li Pools system, Upgrade PD::Pool and add better logging
- Add ResetFast to Pool using c++20 concept
- Add Put function to Pool
- Use Pool Index instead of pointers in Command
- Add accessor to Li Pools to prevent wrong command usage
- Add Command Formatter
- Use ResetFast for all Pools
- Add Reset func to Li::Vertex (for ResetFast)
- Add Pool Expandor and Put funcs to Lithium pools
- Add getters for GfxDriverBase to PD::Li Pools
2026-03-21 13:35:16 +01:00

26 lines
788 B
C++

#pragma once
#include <cstddef>
#include <pd/lithium/vertex.hpp>
namespace PD {
namespace Li {
/**
* Allocate an amount of vertices
* returns the index of the first vertex
*/
PD_API size_t AllocateVertices(size_t count, PD::ptr accessor);
/**
* Allocate an amount of indices
* returns the index of the first elem
*/
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 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);
PD_API const u16& GetIndex(size_t loc);
PD_API void ResetPools();
} // namespace Li
} // namespace PD