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:
parent
8c6648f47e
commit
0035c23641
9 changed files with 48 additions and 83 deletions
21
src/shader.h
21
src/shader.h
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue