move clipping to painter

This commit is contained in:
Eduardo Bart
2012-04-04 19:46:49 -03:00
parent 1410031e02
commit 16acfebe3b
7 changed files with 28 additions and 19 deletions

View File

@@ -152,17 +152,6 @@ void Graphics::endRender()
*/
}
void Graphics::beginClipping(const Rect& clipRect)
{
glEnable(GL_SCISSOR_TEST);
glScissor(clipRect.left(), m_viewportSize.height() - clipRect.bottom() - 1, clipRect.width(), clipRect.height());
}
void Graphics::endClipping()
{
glDisable(GL_SCISSOR_TEST);
}
void Graphics::setViewportSize(const Size& size)
{
glViewport(0, 0, size.width(), size.height());