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

Work on CMorphBallShadow

This commit is contained in:
Jack Andersen
2017-03-04 21:57:12 -10:00
parent 52fe795407
commit 8ef9ed2c3b
23 changed files with 509 additions and 132 deletions

View File

@@ -463,7 +463,7 @@ void CGraphics::SetViewportResolution(const zeus::CVector2i& res)
}
static boo::SWindowRect CachedVP;
static float CachedDepthRange[2] = {0.f, 1.f};
zeus::CVector2f CGraphics::g_CachedDepthRange = {0.f, 1.f};
void CGraphics::SetViewport(int leftOff, int bottomOff, int width, int height)
{
@@ -471,7 +471,7 @@ void CGraphics::SetViewport(int leftOff, int bottomOff, int width, int height)
CachedVP.location[1] = bottomOff;
CachedVP.size[0] = width;
CachedVP.size[1] = height;
g_BooMainCommandQueue->setViewport(CachedVP, CachedDepthRange[0], CachedDepthRange[1]);
g_BooMainCommandQueue->setViewport(CachedVP, g_CachedDepthRange[0], g_CachedDepthRange[1]);
}
void CGraphics::SetScissor(int leftOff, int bottomOff, int width, int height)
@@ -482,9 +482,9 @@ void CGraphics::SetScissor(int leftOff, int bottomOff, int width, int height)
void CGraphics::SetDepthRange(float znear, float zfar)
{
CachedDepthRange[0] = znear;
CachedDepthRange[1] = zfar;
g_BooMainCommandQueue->setViewport(CachedVP, CachedDepthRange[0], CachedDepthRange[1]);
g_CachedDepthRange[0] = znear;
g_CachedDepthRange[1] = zfar;
g_BooMainCommandQueue->setViewport(CachedVP, g_CachedDepthRange[0], g_CachedDepthRange[1]);
}
CTimeProvider* CGraphics::g_ExternalTimeProvider = nullptr;