2
0
mirror of https://github.com/AxioDL/metaforce.git synced 2025-12-17 04:47:09 +00:00

Initial working CGraphics Stream API

This commit is contained in:
2022-03-04 22:36:54 -05:00
parent d93cf46bc3
commit 33d0d14fda
18 changed files with 976 additions and 44 deletions

View File

@@ -150,10 +150,20 @@ void CGraphics::EndScene() {
UpdateFPSCounter();
}
void CGraphics::Render2D(const CTexture& tex, u32 x, u32 y, u32 w, u32 h, const zeus::CColor& col) {
const auto oldProj = g_Proj;
CGraphics::SetOrtho(-g_Viewport.x8_width / 2, g_Viewport.x8_width / 2, g_Viewport.xc_height / 2,
-g_Viewport.xc_height / 2, -1.f, -10.f);
// TODO
g_Proj = oldProj;
FlushProjection();
}
bool CGraphics::BeginRender2D(const CTexture& tex) { return false; }
void CGraphics::DoRender2D(const CTexture& tex, s32 x, s32 y, s32 w1, s32 w2, s32 w3, s32 w4, s32 w5,
const zeus::CColor& col) {}
void CGraphics::EndRender2D(bool v) {}
void CGraphics::SetAlphaCompare(ERglAlphaFunc comp0, u8 ref0, ERglAlphaOp op, ERglAlphaFunc comp1, u8 ref1) {}
@@ -565,7 +575,5 @@ void CGraphics::StreamVertex(const zeus::CVector3f& pos) {
aurora::gfx::stream_vertex(sStreamFlags, pos, sQueuedNormal, sQueuedColor, sQueuedTexCoord);
}
void CGraphics::StreamEnd() {
aurora::gfx::stream_end();
}
void CGraphics::StreamEnd() { aurora::gfx::stream_end(); }
} // namespace metaforce