Fixed issue where the viewport's width and/or height could be off by 1 pixel

Signed-off-by: Stefan Schindler <stefan@boxbox.org>
This commit is contained in:
Remco van Oosterhout 2014-05-14 16:25:49 +02:00 committed by Stefan Schindler
parent 0375d7588f
commit 3fa1d0e03d

View File

@ -133,8 +133,8 @@ IntRect RenderTarget::getViewport(const View& view) const
return IntRect(static_cast<int>(0.5f + width * viewport.left), return IntRect(static_cast<int>(0.5f + width * viewport.left),
static_cast<int>(0.5f + height * viewport.top), static_cast<int>(0.5f + height * viewport.top),
static_cast<int>(width * viewport.width), static_cast<int>(0.5f + width * viewport.width),
static_cast<int>(height * viewport.height)); static_cast<int>(0.5f + height * viewport.height));
} }