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 ...@@ -1643,12 +1643,13 @@ void GLVertexBufferPrivate::legacyPainting( QRegion region, GLenum primitiveMode
} }
// Clip using scissoring // Clip using scissoring
PaintClipper pc( region ); if (region != infiniteRegion()) {
for( PaintClipper::Iterator iterator; PaintClipper pc(region);
!iterator.isDone(); for (PaintClipper::Iterator iterator; !iterator.isDone(); iterator.next()) {
iterator.next()) glDrawArrays(primitiveMode, 0, numberVertices);
{ }
glDrawArrays( primitiveMode, 0, numberVertices ); } else {
glDrawArrays(primitiveMode, 0, numberVertices);
} }
glDisableClientState( GL_VERTEX_ARRAY ); glDisableClientState( GL_VERTEX_ARRAY );
...@@ -1682,12 +1683,13 @@ void GLVertexBufferPrivate::corePainting( const QRegion& region, GLenum primitiv ...@@ -1682,12 +1683,13 @@ void GLVertexBufferPrivate::corePainting( const QRegion& region, GLenum primitiv
} }
// Clip using scissoring // Clip using scissoring
PaintClipper pc( region ); if (region != infiniteRegion()) {
for( PaintClipper::Iterator iterator; PaintClipper pc(region);
!iterator.isDone(); for (PaintClipper::Iterator iterator; !iterator.isDone(); iterator.next()) {
iterator.next()) glDrawArrays(primitiveMode, 0, numberVertices);
{ }
glDrawArrays( primitiveMode, 0, numberVertices ); } else {
glDrawArrays(primitiveMode, 0, numberVertices);
} }
glBindBuffer( GL_ARRAY_BUFFER, 0 ); glBindBuffer( GL_ARRAY_BUFFER, 0 );
...@@ -1793,12 +1795,13 @@ void GLVertexBuffer::render( const QRegion& region, GLenum primitiveMode ) ...@@ -1793,12 +1795,13 @@ void GLVertexBuffer::render( const QRegion& region, GLenum primitiveMode )
} }
// Clip using scissoring // Clip using scissoring
PaintClipper pc( region ); if (region != infiniteRegion()) {
for( PaintClipper::Iterator iterator; PaintClipper pc(region);
!iterator.isDone(); for (PaintClipper::Iterator iterator; !iterator.isDone(); iterator.next()) {
iterator.next()) glDrawArrays(primitiveMode, 0, d->numberVertices);
{ }
glDrawArrays( primitiveMode, 0, d->numberVertices ); } else {
glDrawArrays(primitiveMode, 0, d->numberVertices);
} }
glBindBuffer( GL_ARRAY_BUFFER, 0 ); 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