All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
BatchedSpriteMaterial.h
1 // Copyright eeGeo Ltd (2012-2014), All Rights Reserved
2 
3 #pragma once
4 
5 #include "Types.h"
6 #include "IMaterial.h"
7 #include "IdTypes.h"
8 #include "BatchedSpriteShader.h"
9 #include "Rendering.h"
10 #include "TextureMinifyType.h"
11 #include <string>
12 
13 namespace Eegeo
14 {
15  namespace Rendering
16  {
17  namespace Materials
18  {
23  {
24  public:
25  BatchedSpriteMaterial(const TMaterialId materialId,
26  const std::string& name,
28  TTextureId textureId,
29  TextureMinifyType textureMinifyType = Rendering::TextureMinify_Linear
30  );
31 
32  const TMaterialId GetId() const { return m_id; }
33  const Shader& GetShader() const { return m_shader; }
34  const std::string& GetName() const { return m_name; }
35 
36  void SetState(Rendering::GLState& glState) const;
37 
38  void SetStatePerRenderable(const Rendering::RenderableBase* renderableBase, Rendering::GLState& glState) const;
39 
40  protected:
41  const TMaterialId m_id;
42  const std::string m_name;
44  TTextureId m_textureId;
45  TextureMinifyType m_textureMinifyType;
46  };
47  }
48  }
49 }