]> git.tdb.fi Git - libs/gl.git/commit
Use a persistent sorted array in ZSortedScene
authorMikko Rasa <tdb@tdb.fi>
Fri, 4 Dec 2015 18:43:07 +0000 (20:43 +0200)
committerMikko Rasa <tdb@tdb.fi>
Fri, 4 Dec 2015 23:50:07 +0000 (01:50 +0200)
commitaf0077ac71c51aeed63bc0222fe4650d5077478a
treea8d1042e40e2d8eb188423838f282f464bd3d67e
parentb345b919f572b35042d7c50291422f2f917e5a08
Use a persistent sorted array in ZSortedScene

Typically the order of renderables changes very little between frames, so
it's possible to use insertion sort which is very fast for almost-sorted
arrays.
source/zsortedscene.cpp
source/zsortedscene.h