2
0
mirror of https://github.com/AxioDL/metaforce.git synced 2025-12-08 21:47:42 +00:00

Make CLineRenderer supply verts in clip-space

This commit is contained in:
Jack Andersen
2018-06-23 15:01:29 -10:00
parent 19ffd74468
commit 4ddec7e10c
5 changed files with 46 additions and 32 deletions

View File

@@ -468,6 +468,12 @@ zeus::CVector3f CGraphics::ProjectModelPointToViewportSpace(const zeus::CVector3
return GetPerspectiveProjectionMatrix(true).multiplyOneOverW(pt);
}
zeus::CVector3f CGraphics::ProjectModelPointToViewportSpace(const zeus::CVector3f& point, float& wOut)
{
zeus::CVector3f pt = g_GXModelView * point;
return GetPerspectiveProjectionMatrix(true).multiplyOneOverW(pt, wOut);
}
void CGraphics::SetViewportResolution(const zeus::CVector2i& res)
{
g_Viewport.x8_width = res.x;