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

Refactored widescreen filter to set renderer viewport as well

This commit is contained in:
Jack Andersen
2016-09-02 13:37:02 -10:00
parent 4fdf84d6b8
commit ce3014b313
11 changed files with 113 additions and 54 deletions

View File

@@ -28,6 +28,7 @@ zeus::CTransform CGraphics::g_GXViewPointMatrix;
zeus::CTransform CGraphics::g_CameraMatrix;
zeus::CVector2i CGraphics::g_ViewportResolution;
zeus::CVector2i CGraphics::g_ViewportResolutionHalf;
SClipScreenRect CGraphics::g_CroppedViewport;
int CGraphics::g_ViewportSamples = 1;
bool CGraphics::g_IsGXModelMatrixIdentity = true;
@@ -398,6 +399,9 @@ zeus::CVector3f CGraphics::ProjectModelPointToViewportSpace(const zeus::CVector3
void CGraphics::SetViewportResolution(const zeus::CVector2i& res)
{
g_ViewportResolution = res;
g_CroppedViewport = SClipScreenRect();
g_CroppedViewport.xc_width = res.x;
g_CroppedViewport.x10_height = res.y;
g_ViewportResolutionHalf = {res.x / 2, res.y / 2};
}