Skip to content

Faster and more correct OGL transparent surface sorting

Hannu Hanhi requested to merge Hannu_Hanhi/SRB2:ogl-drawnode-fix into next

This patch fixes some ordering issues in HWR_CreateDrawNodes. It also makes it faster by replacing the O(n^2) bubble sort algorithm with O(n \log n) quick sort.

Comparison images:

Before After
before after
before after

Performance comparison:

Before After
before 558 microseconds after 26 microseconds
before 490 microseconds after 41 microseconds

Merge request reports