Made scissor rect/viewport Recti instead of Rectui

Also greatly optimized Renderer::Get[ScissorRect|Viewport]


Former-commit-id: 87945543144216715520a4c3ab30629636995afd
This commit is contained in:
Lynix
2013-08-26 13:37:33 +02:00
parent 7d9eac7660
commit f679f323c2
10 changed files with 258 additions and 115 deletions

View File

@@ -106,7 +106,7 @@ const NzMatrix4f& NzCamera::GetViewMatrix() const
return m_viewMatrix;
}
const NzRectui& NzCamera::GetViewport() const
const NzRecti& NzCamera::GetViewport() const
{
#if NAZARA_GRAPHICS_SAFE
if (!m_target)
@@ -164,7 +164,7 @@ void NzCamera::SetTargetRegion(const NzRectf& region)
m_viewportUpdated = false;
}
void NzCamera::SetViewport(const NzRectui& viewport)
void NzCamera::SetViewport(const NzRecti& viewport)
{
#if NAZARA_GRAPHICS_SAFE
if (!m_target)
@@ -250,11 +250,14 @@ bool NzCamera::OnRenderTargetSizeChange(const NzRenderTarget* renderTarget, void
m_frustumUpdated = false;
m_projectionMatrixUpdated = false;
m_viewportUpdated = false;
return true;
}
else
{
NazaraInternalError("Not listening to " + NzString::Pointer(renderTarget));
return true;
return false;
}
}
void NzCamera::UpdateFrustum() const

View File

@@ -99,7 +99,7 @@ const NzMatrix4f& NzView::GetViewMatrix() const
return m_viewMatrix;
}
const NzRectui& NzView::GetViewport() const
const NzRecti& NzView::GetViewport() const
{
#if NAZARA_GRAPHICS_SAFE
if (!m_target)
@@ -149,7 +149,7 @@ void NzView::SetTargetRegion(const NzRectf& region)
m_viewportUpdated = false;
}
void NzView::SetViewport(const NzRectui& viewport)
void NzView::SetViewport(const NzRecti& viewport)
{
#if NAZARA_GRAPHICS_SAFE
if (!m_target)