Renderer: Replaced RenderTarget::Get[Height|Width] by RenderTarget::GetSize

Utility: Removed Window::Get[Height|Width] methods
This commit is contained in:
Lynix
2017-10-28 23:26:22 +02:00
parent bf8ebbd046
commit d688cecbde
20 changed files with 44 additions and 102 deletions

View File

@@ -237,10 +237,9 @@ namespace Ndk
NazaraAssert(m_target, "Component has no render target");
// We compute the region necessary to make this view port with the actual size of the target
float invWidth = 1.f / m_target->GetWidth();
float invHeight = 1.f / m_target->GetHeight();
Nz::Vector2f invSize = 1.f / Nz::Vector2f(m_target->GetSize());
SetTargetRegion(Nz::Rectf(invWidth * viewport.x, invHeight * viewport.y, invWidth * viewport.width, invHeight * viewport.height));
SetTargetRegion(Nz::Rectf(invSize.x * viewport.x, invSize.y * viewport.y, invSize.x * viewport.width, invSize.y * viewport.height));
}
/*!