3DS: Slightly refactor GPU operations
Vicki Pfau vi@endrift.com
Tue, 25 Aug 2020 03:20:52 -0700
1 files changed,
4 insertions(+),
5 deletions(-)
jump to
M
src/platform/3ds/ctr-gpu.c
→
src/platform/3ds/ctr-gpu.c
@@ -80,6 +80,10 @@ AttrInfo_AddLoader(attrInfo, 1, GPU_SHORT, 4); // in_tc0
AttrInfo_AddLoader(attrInfo, 2, GPU_UNSIGNED_BYTE, 4); // in_col AttrInfo_AddLoader(attrInfo, 3, GPU_FLOAT, 2); // in_rot + C3D_BufInfo* bufInfo = C3D_GetBufInfo(); + BufInfo_Init(bufInfo); + BufInfo_Add(bufInfo, ctrVertexBuffer, sizeof(struct ctrUIVertex), 4, 0x3210); + return true; }@@ -213,13 +217,8 @@ void ctrStartFrame(void) {
ctrNumVerts = 0; ctrVertStart = 0; activeTexture = NULL; - - C3D_BufInfo* bufInfo = C3D_GetBufInfo(); - BufInfo_Init(bufInfo); - BufInfo_Add(bufInfo, ctrVertexBuffer, sizeof(struct ctrUIVertex), 4, 0x3210); } void ctrEndFrame(void) { ctrFlushBatch(); - GSPGPU_FlushDataCache(ctrVertexBuffer, sizeof(struct ctrUIVertex) * ctrNumVerts); }