Commit 1ad65de7 authored by Martin Flöser's avatar Martin Flöser
Browse files

Disable clipping when rendering infiniteRegion

parent 55767a06
......@@ -1643,12 +1643,13 @@ void GLVertexBufferPrivate::legacyPainting( QRegion region, GLenum primitiveMode
}
// Clip using scissoring
PaintClipper pc( region );
for( PaintClipper::Iterator iterator;
!iterator.isDone();
iterator.next())
{
glDrawArrays( primitiveMode, 0, numberVertices );
if (region != infiniteRegion()) {
PaintClipper pc(region);
for (PaintClipper::Iterator iterator; !iterator.isDone(); iterator.next()) {
glDrawArrays(primitiveMode, 0, numberVertices);
}
} else {
glDrawArrays(primitiveMode, 0, numberVertices);
}
glDisableClientState( GL_VERTEX_ARRAY );
......@@ -1682,12 +1683,13 @@ void GLVertexBufferPrivate::corePainting( const QRegion& region, GLenum primitiv
}
// Clip using scissoring
PaintClipper pc( region );
for( PaintClipper::Iterator iterator;
!iterator.isDone();
iterator.next())
{
glDrawArrays( primitiveMode, 0, numberVertices );
if (region != infiniteRegion()) {
PaintClipper pc(region);
for (PaintClipper::Iterator iterator; !iterator.isDone(); iterator.next()) {
glDrawArrays(primitiveMode, 0, numberVertices);
}
} else {
glDrawArrays(primitiveMode, 0, numberVertices);
}
glBindBuffer( GL_ARRAY_BUFFER, 0 );
......@@ -1793,12 +1795,13 @@ void GLVertexBuffer::render( const QRegion& region, GLenum primitiveMode )
}
// Clip using scissoring
PaintClipper pc( region );
for( PaintClipper::Iterator iterator;
!iterator.isDone();
iterator.next())
{
glDrawArrays( primitiveMode, 0, d->numberVertices );
if (region != infiniteRegion()) {
PaintClipper pc(region);
for (PaintClipper::Iterator iterator; !iterator.isDone(); iterator.next()) {
glDrawArrays(primitiveMode, 0, d->numberVertices);
}
} else {
glDrawArrays(primitiveMode, 0, d->numberVertices);
}
glBindBuffer( GL_ARRAY_BUFFER, 0 );
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment