all repos — mgba @ fcda3df24dd346cb8637209dcb25e05a7adc25ec

mGBA Game Boy Advance Emulator

3DS: Slightly refactor GPU operations
Vicki Pfau vi@endrift.com
Tue, 25 Aug 2020 03:20:52 -0700
commit

fcda3df24dd346cb8637209dcb25e05a7adc25ec

parent

07c2c87d000a0db0185800b4a8965e6b1d57be35

1 files changed, 4 insertions(+), 5 deletions(-)

jump to
M src/platform/3ds/ctr-gpu.csrc/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); }