mirror of
https://github.com/scp-fs2open/fs2open.github.com.git
synced 2026-11-11 04:31:35 -10:00
This fixes a few of the bad design descisions of previous shader iterations. This uses a dedicated class for managing the resources and uniform locations of a shader program. Uniforms are also stored in this object which makes a lot more sense than storing them in the OpenGL state where they had to be reset every time a new shader was used. There are still a lot of possible enhancments to make, e.g. by using uniform blocks and buffers instead of standard uniforms which would make uniform location handling easier. Another optimization that I will investigate is reducing the amount or different compiled shaders by turning some of the current compile-time defines into bool uniforms.