]> git.tdb.fi Git - libs/gl.git/commitdiff
Fix a comparison with restart_index
authorMikko Rasa <tdb@tdb.fi>
Sat, 3 Nov 2012 13:35:43 +0000 (15:35 +0200)
committerMikko Rasa <tdb@tdb.fi>
Sat, 3 Nov 2012 13:35:43 +0000 (15:35 +0200)
An incorrect comparison operator caused a batch meeting certain criteria
to unintentionally trigger a primitive restart with its last index instead
of rendering it properly.

source/batch.cpp

index d6924a80e0cc56378d7f20b892b04ee0bb251453..3f7bffee901da3bfab572e197a44da13ff912741 100644 (file)
@@ -229,7 +229,7 @@ void Batch::draw() const
                        restart_index = index;
                }
        }
-       else if(restart_index && restart_index<max_index)
+       else if(restart_index && restart_index<=max_index)
        {
                glDisableClientState(GL_PRIMITIVE_RESTART_NV);
                restart_index = 0;