mirror of
https://github.com/scp-fs2open/fs2open.github.com.git
synced 2026-11-10 17:46:53 -10:00
Refactor shader handling
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.
This commit is contained in:
1 parent
82eadd3983
commit
3fcb731621
38 files changed
+1341
-1398
No files matched your search
+1
-1
@@ -12,7 +12,7 @@
|
||||
#include "graphics/2d.h"
|
||||
#include "graphics/font.h"
|
||||
#include "graphics/generic.h"
|
||||
#include "graphics/gropenglpostprocessing.h"
|
||||
#include "graphics/opengl/gropenglpostprocessing.h"
|
||||
#include "headtracking/headtracking.h"
|
||||
#include "hud/hudbrackets.h"
|
||||
#include "hud/hudconfig.h"
|
||||
|
||||
Reference in new issue
Block a user