mirror of https://github.com/mgba-emu/mgba.git
3DS: Slightly refactor GPU operations
This commit is contained in:
parent
07c2c87d00
commit
fcda3df24d
|
@ -80,6 +80,10 @@ bool ctrInitGpu(void) {
|
||||||
AttrInfo_AddLoader(attrInfo, 2, GPU_UNSIGNED_BYTE, 4); // in_col
|
AttrInfo_AddLoader(attrInfo, 2, GPU_UNSIGNED_BYTE, 4); // in_col
|
||||||
AttrInfo_AddLoader(attrInfo, 3, GPU_FLOAT, 2); // in_rot
|
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;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -213,13 +217,8 @@ void ctrStartFrame(void) {
|
||||||
ctrNumVerts = 0;
|
ctrNumVerts = 0;
|
||||||
ctrVertStart = 0;
|
ctrVertStart = 0;
|
||||||
activeTexture = NULL;
|
activeTexture = NULL;
|
||||||
|
|
||||||
C3D_BufInfo* bufInfo = C3D_GetBufInfo();
|
|
||||||
BufInfo_Init(bufInfo);
|
|
||||||
BufInfo_Add(bufInfo, ctrVertexBuffer, sizeof(struct ctrUIVertex), 4, 0x3210);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void ctrEndFrame(void) {
|
void ctrEndFrame(void) {
|
||||||
ctrFlushBatch();
|
ctrFlushBatch();
|
||||||
GSPGPU_FlushDataCache(ctrVertexBuffer, sizeof(struct ctrUIVertex) * ctrNumVerts);
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue