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

@ -34,6 +34,7 @@ struct mrb_state;
struct SDL_Window;
struct TEXFBO;
struct Quad;
struct ShaderSet;
class Scene;
class FileSystem;
@ -42,18 +43,6 @@ class Graphics;
class Input;
class Audio;
class GLState;
class SimpleShader;
class SimpleColorShader;
class SimpleAlphaShader;
class SimpleSpriteShader;
class SimpleMatrixShader;
class SpriteShader;
class PlaneShader;
class FlashMapShader;
class TransShader;
class SimpleTransShader;
class HueShader;
class BltShader;
class TexPool;
class FontPool;
class Font;
@ -84,22 +73,7 @@ struct SharedState
GLState &_glState();
SimpleShader &simpleShader();
SimpleColorShader &simpleColorShader();
SimpleAlphaShader &simpleAlphaShader();
SimpleSpriteShader &simpleSpriteShader();
SpriteShader &spriteShader();
PlaneShader &planeShader();
FlashMapShader &flashMapShader();
TransShader &transShader();
SimpleTransShader &sTransShader();
HueShader &hueShader();
BltShader &bltShader();
#ifdef RGSS2
SimpleMatrixShader &simpleMatrixShader();
BlurShader &blurShader();
#endif
ShaderSet &shaders();
TexPool &texPool();
FontPool &fontPool();