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
This commit is contained in:
2026-03-21 13:35:16 +01:00
parent 3b0b103eb3
commit a86c13b9a3
16 changed files with 247 additions and 55 deletions
+1 -1
View File
@@ -236,7 +236,7 @@ void GfxCitro3D::DeleteTexture(const Li::Texture& tex) {
#else
namespace PD {
void GfxCitro3D::SysInit() {
PDLOG(
PDERR(
"GfxCitro3D::SysInit: Citro3D Driver is not included in "
"palladium-system");
}
+3 -3
View File
@@ -86,7 +86,7 @@ void GfxDirectX9::SysInit() {
HRESULT hr = D3DCompile(g_vsCode, strlen(g_vsCode), nullptr, nullptr,
nullptr, "main", "vs_2_0", 0, 0, &vsBlob, &errBlob);
if (FAILED(hr)) {
PDLOG("Vertex Shader compile error: {}",
PDERR("Vertex Shader compile error: {}",
errBlob ? (char*)errBlob->GetBufferPointer() : "");
} else {
impl->Device->CreateVertexShader((DWORD*)vsBlob->GetBufferPointer(),
@@ -109,7 +109,7 @@ void GfxDirectX9::SysInit() {
if (psBlob) psBlob->Release();
if (errBlob) errBlob->Release();
} else {
PDLOG(
PDERR(
"GfxDirectX9::SysInit Error: pDevice is not set!\nYOu need to include "
"your D3D9 Device as "
"folowing:\nPD::Gfx::UseDriver<PD::GfxDirectX9>(D3D9Device);");
@@ -276,7 +276,7 @@ void GfxDirectX9::DeleteTexture(const Li::Texture& tex) {
#else
namespace PD {
void GfxDirectX9::SysInit() {
PDLOG(
PDERR(
"GfxDirectX9::SysInit: DirectX9 Driver is not included in "
"palladium-system");
}
+1 -5
View File
@@ -82,10 +82,6 @@ void GfxOpenGL2::SysInit() {
glBindBuffer(GL_ARRAY_BUFFER, 0);
glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, 0);
PDLOG(
"GfxOpenGL2::SysInit():\n pShader = {}\n pLocTex = {}\n pLocAlfa = "
"{}\n pLocProjection = {}\n VBO = {}\n IBO = {}",
pShader, pLocTex, pLocAlfa, pLocProjection, VBO, IBO);
}
void GfxOpenGL2::SysDeinit() {
@@ -172,7 +168,7 @@ void GfxOpenGL2::DeleteTexture(const Li::Texture& tex) {
#else
namespace PD {
void GfxOpenGL2::SysInit() {
PDLOG(
PDERR(
"GfxOpenGL2::SysInit: OpenGL2 Driver is not included in "
"palladium-system");
}
+1 -5
View File
@@ -52,10 +52,6 @@ void GfxOpenGL3::SysInit() {
glBindBuffer(GL_ARRAY_BUFFER, 0);
glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, 0);
glBindVertexArray(0);
PDLOG(
"GfxOpenGL3::SysInit():\n pShader = {}\n pLocTex = {}\n pLocAlfa = "
"{}\n pLocProjection = {}\n VBO = {}\n IBO = {}, VAO = {}",
pShader, pLocTex, pLocAlfa, pLocProjection, VBO, IBO, VAO);
}
void GfxOpenGL3::SysDeinit() {
@@ -142,7 +138,7 @@ void GfxOpenGL3::DeleteTexture(const Li::Texture& tex) {
#else
namespace PD {
void GfxOpenGL3::SysInit() {
PDLOG(
PDERR(
"GfxOpenGL3::SysInit: OpenGL3 Driver is not included in "
"palladium-system");
}