Add CGraphics::GetViewport

This commit is contained in:
Luke Street 2020-03-04 14:00:21 -05:00
parent d95064c7dd
commit 325aa53020
2 changed files with 3 additions and 0 deletions

View File

@ -410,6 +410,8 @@ void CGraphics::SetViewportResolution(const zeus::CVector2i& res) {
static boo::SWindowRect CachedVP;
zeus::CVector2f CGraphics::g_CachedDepthRange = {0.f, 1.f};
const boo::SWindowRect& CGraphics::GetViewport() { return CachedVP; }
void CGraphics::SetViewport(int leftOff, int bottomOff, int width, int height) {
CachedVP.location[0] = leftOff;
CachedVP.location[1] = bottomOff;

View File

@ -295,6 +295,7 @@ public:
static SClipScreenRect ClipScreenRectFromVS(const zeus::CVector3f& p1, const zeus::CVector3f& p2);
static zeus::CVector3f ProjectModelPointToViewportSpace(const zeus::CVector3f& point);
static zeus::CVector3f ProjectModelPointToViewportSpace(const zeus::CVector3f& point, float& wOut);
static const boo::SWindowRect& GetViewport();
static void SetViewportResolution(const zeus::CVector2i& res);
static void SetViewport(int leftOff, int bottomOff, int width, int height);