Merge pull request #7 from AJenbo/3ds

Apply optimizations
This commit is contained in:
Joshua Peisach 2025-06-28 15:58:50 -04:00 committed by GitHub
commit 39cf5b9a9f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -287,10 +287,7 @@ C3DMeshCacheEntry C3DUploadMesh(const MeshGroup& meshGroup)
indexBuffer.assign(meshGroup.indices.begin(), meshGroup.indices.end()); indexBuffer.assign(meshGroup.indices.begin(), meshGroup.indices.end());
} }
MINIWIN_NOT_IMPLEMENTED(); // Flatten vertices as IBO is buggy on 3DS hardware
// TODO use ibo instead of flattening verticies, see
// https://github.com/devkitPro/3ds-examples/blob/44faa81d79d5781c0e149e4a7005f2e005edb736/graphics/gpu/loop_subdivision/source/main.c#L104
std::vector<D3DRMVERTEX> vertexUploadBuffer; std::vector<D3DRMVERTEX> vertexUploadBuffer;
vertexUploadBuffer.reserve(indexBuffer.size()); vertexUploadBuffer.reserve(indexBuffer.size());
@ -450,8 +447,7 @@ void Citro3DRenderer::SubmitDraw(
const Appearance& appearance const Appearance& appearance
) )
{ {
C3D_Mtx projection, modelView; C3D_Mtx modelView;
ConvertPerspective(m_projection, &projection);
ConvertMatrix(modelViewMatrix, &modelView); ConvertMatrix(modelViewMatrix, &modelView);
C3D_FVUnifMtx4x4(GPU_VERTEX_SHADER, uLoc_modelView, &modelView); C3D_FVUnifMtx4x4(GPU_VERTEX_SHADER, uLoc_modelView, &modelView);