MYST3: Change frameViewport to be in screen coordinates rather than OpenGl coordinates

This commit is contained in:
Bastien Bouclet 2015-04-19 11:04:43 +02:00
parent 5bb96c937a
commit 1537ec2de2
6 changed files with 41 additions and 19 deletions

View file

@ -177,7 +177,7 @@ void ShaderRenderer::setupCameraOrtho2D(bool noScaling) {
}
void ShaderRenderer::setViewport(const Common::Rect &vp) {
glViewport(vp.left, vp.top, vp.width(), vp.height());
glViewport(vp.left, _system->getHeight() - vp.top - vp.height(), vp.width(), vp.height());
}
void ShaderRenderer::drawRect2D(const Common::Rect &rect, uint32 color) {