Also added support for creating indexed textures directly into CreateTexBuffer, where this functionality can be shared.
As an added plus, brightmaps are working again, this time with less hackery.
Game compiles and runs but transparency doesn't work yet.
# Conflicts:
# source/CMakeLists.txt
# source/core/menu/menu.cpp
# source/core/textures/buildtiles.cpp
Models are currently non-functional and need to reroute their texture handling to the global texture manager instead of handling everything themselves.
Voxels also need a bit of work to make their texture management more automated.
This needs to be moved into the backend, and partially into the shader. So far this only removes the code from the main rendering logic, the final implementation is not done yet.
It had to go because it required the main rendering code to look deep into the texture data which would be a major blocker for refactoring.
These will have to do some texture management bookkeeping so directly changing the values is problematic.
This required changing the parameter interface in polymost.cpp because a few places hacked around with the global state to pass parameters to subfunctions.