Shader: Group all shaders in one collective struct

Makes sharedstate.{cpp|h} a lot easier to read, and
adding new shaders a one liner.
This commit is contained in:
Jonas Kulla 2013-12-11 05:22:13 +01:00
parent 8c6648f47e
commit 0035c23641
9 changed files with 48 additions and 83 deletions

View file

@ -247,4 +247,25 @@ private:
GLint u_source, u_destination, u_subRect, u_opacity;
};
/* Global object containing all available shaders */
struct ShaderSet
{
SimpleShader simple;
SimpleColorShader simpleColor;
SimpleAlphaShader simpleAlpha;
SimpleSpriteShader simpleSprite;
SpriteShader sprite;
PlaneShader plane;
FlashMapShader flashMap;
TransShader trans;
SimpleTransShader simpleTrans;
HueShader hue;
BltShader blt;
#ifdef RGSS2
SimpleMatrixShader simpleMatrix;
BlurShader blur;
#endif
};
#endif // SHADER_H