base for software renderer

This commit is contained in:
StapleButter
2017-02-10 16:50:26 +01:00
parent c95f7578bb
commit 78f49d061a
4 changed files with 75 additions and 1 deletions

View File

@ -177,11 +177,15 @@ bool Init()
CmdFIFO = new FIFO<CmdFIFOEntry>(256);
CmdPIPE = new FIFO<CmdFIFOEntry>(4);
if (!SoftRenderer::Init()) return false;
return true;
}
void DeInit()
{
SoftRenderer::DeInit();
delete CmdFIFO;
delete CmdPIPE;
}
@ -228,6 +232,8 @@ void Reset()
CurPolygonRAM = &PolygonRAM[0];
NumVertices = 0;
NumPolygons = 0;
SoftRenderer::Reset();
}
@ -1152,7 +1158,8 @@ void CheckFIFODMA()
void VBlank()
{
// TODO: render
// TODO: only do this if a SwapBuffers command was issued
SoftRenderer::RenderFrame(CurVertexRAM, CurPolygonRAM, NumPolygons);
CurRAMBank = CurRAMBank?0:1;
CurVertexRAM = &VertexRAM[CurRAMBank ? 6144 : 0];