zturtleman / spearmint

Spearmint — an updated id Tech 3 engine for continuing the classics and creating new games.
https://clover.moe/spearmint
GNU General Public License v3.0
239 stars 27 forks source link

World of Padman vertex poly sorting #185

Closed zturtleman closed 9 years ago

zturtleman commented 10 years ago

The World of Padman renderer sorts polys added using RE_AddPolyToScene, the level for sort is stored in the st[0] of vertex 0. Level 0 is not sorted.

Sprites would benefit from distance sorting, would it work for "spray your color" polys? Otherwise adding level for sort to poly syscall or ref entity structure might be best.

zturtleman commented 9 years ago

Added renderer support for custom AddPolyToScene draw order in fc1a985397d5e71703e2b22929812ce58fc12433. Still need to enable CGame to pass sortLevel to AddPolyToScene, which will be an API change.

zturtleman commented 9 years ago

Added sort level to CGame API in devil branch: https://github.com/zturtleman/spearmint/commit/a97cfac333677691febf950fe20e3cd3ba5b7846