Upload pools once per Gfx::Draw and FIX DX9

This commit is contained in:
2026-09-03 09:18:49 +02:00
parent f1540f0098
commit 2801b876e6
11 changed files with 103 additions and 69 deletions
+7 -3
View File
@@ -152,9 +152,6 @@ void GfxCitro3D::Submit(size_t count, size_t start) {
C3D_FVUnifMtx4x4(GPU_VERTEX_SHADER, impl->uLocProjection, &proj);
// C3D_FVUnifMtx4x4(GPU_VERTEX_SHADER, impl->uLocProjection,
// (C3D_Mtx*)&Projection);
auto buf = C3D_GetBufInfo();
BufInfo_Init(buf);
BufInfo_Add(buf, GetVertexBufPtr(0), sizeof(Li::Vertex), 3, 0x210);
C3D_DrawElements(GPU_TRIANGLES, count, C3D_UNSIGNED_SHORT,
GetIndexBufPtr(start));
impl->CurrentTex = nullptr;
@@ -240,6 +237,12 @@ void GfxCitro3D::DeleteTexture(const Li::Texture& tex) {
C3D_TexDelete(t);
delete t;
}
void GfxCitro3D::UploadPools() {
auto buf = C3D_GetBufInfo();
BufInfo_Init(buf);
BufInfo_Add(buf, GetVertexBufPtr(0), sizeof(Li::Vertex), 3, 0x210);
}
} // namespace PD
#else
namespace PD {
@@ -258,5 +261,6 @@ Li::Texture GfxCitro3D::LoadTexture(const std::vector<PD::u8>& pixels, int w,
return Li::Texture();
}
void GfxCitro3D::DeleteTexture(const Li::Texture& tex) {}
void GfxCitro3D::UploadPools() {}
} // namespace PD
#endif