All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
ITextRenderer.h
1 // Copyright eeGeo Ltd (2012-2014), All Rights Reserved
2 
3 #pragma once
4 
5 #include "Types.h"
6 #include "Text.h"
7 #include "Fonts.h"
8 #include "IRenderableFilter.h"
9 #include "VectorMath.h"
10 #include "Graphics.h"
11 #include "LayerIds.h"
12 
13 #include <vector>
14 
15 namespace Eegeo
16 {
17  namespace Text
18  {
20  {
21  public:
22  virtual ~ITextRenderer() {;}
23 
24  virtual void SetDefaultState() = 0;
25 
26  virtual void SetFontInstance(const Fonts::FontInstance* pFontInstance) = 0;
27 
28  virtual void SetTextSize(float pixelHeight) = 0;
29 
30  virtual void SetGlyphColor(const v4& color) = 0;
31 
32  virtual void SetOutlineColor(const v4& color) = 0;
33 
34  virtual void SetHaloStyle(const v4& color, float haloWidth, float haloHardness) = 0;
35 
36  virtual void SetTransform(const v2& translate, const v2& rotate, const v2& scale) = 0;
37 
38  virtual void SetDepthTest(bool depthTest) = 0;
39 
40  virtual void SetStencilTest(bool stencilTest) = 0;
41 
42  virtual void SetStencilFunc(GLenum stencilFunc, int stencilRef, u32 stencilMask) = 0;
43 
44  virtual void SetStencilMaskedStyle(bool enable, GLenum stencilFunc, const v4& glyphColor, const v4& haloColor) = 0;
45 
46  virtual void SetRenderLayer(Rendering::LayerIds::Values layer, int subLayer) = 0;
47 
48  virtual void SetAlpha(float alpha) = 0;
49 
50  virtual void DrawShapedGlyph(const ShapedGlyph& shapedGlyph) = 0;
51 
52  virtual void DrawShapedGlyphs(const std::vector<Text::ShapedGlyph>& shapedGlyphs) = 0;
53 
54  virtual void Finalize() = 0;
55 
56  virtual void Upload() = 0;
57 
58  virtual void Reset() = 0;
59  };
60  }
61 }