6 #include "IScreenIconRenderer.h"
8 #include "BatchedIconAppearanceBuilder.h"
9 #include "BatchedIconAppearance.h"
12 #include "VectorMathDecl.h"
14 #include "IconDefinition.h"
27 void SetIconSet(
const IconSet* pIconSet)
29 m_pIconSet = pIconSet;
30 m_iconSetChanged =
true;
33 void SetDefaultState();
35 void SetIconColor(
const v4& iconColor)
37 m_appearanceBuilder.SetIconColor(iconColor);
38 m_appearanceChanged =
true;
41 void SetScale(
float scale)
43 m_appearanceBuilder.SetScale(scale);
44 m_appearanceChanged =
true;
47 void SetTransform(
const v2& translate,
const v2& rotate,
const v2& scale)
49 m_translate = translate;
54 void SetDepthTest(
bool depthTest)
56 m_appearanceBuilder.SetDepthTest(depthTest);
57 m_appearanceChanged =
true;
60 void SetStencilTest(
bool stencilTest)
62 m_appearanceBuilder.SetStencilTest(stencilTest);
63 m_appearanceChanged =
true;
66 void SetStencilFunc(GLenum stencilFunc,
int stencilRef, u32 stencilMask)
68 m_appearanceBuilder.SetStencilFunc(stencilFunc, stencilRef, stencilMask);
69 m_appearanceChanged =
true;
72 void SetStencilMaskedStyle(
bool enable, GLenum stencilFunc,
const v4& maskedIconColor)
74 m_appearanceBuilder.SetStencilMaskedStyle(enable, stencilFunc, maskedIconColor);
75 m_appearanceChanged =
true;
78 void SetRenderLayer(Rendering::LayerIds::Values layer,
int subLayer)
81 m_subLayer = subLayer;
82 m_layerChanged =
true;
85 void SetAlpha(
float alpha)
90 v2 GetTranslate()
const {
return m_translate; }
91 v2 GetRotate()
const {
return m_rotate; }
92 v2 GetScale()
const {
return m_scale; }
93 float GetAlpha()
const {
return m_alpha; }
95 Rendering::LayerIds::Values GetLayer()
const {
return m_layer; }
96 int GetSubLayer()
const {
return m_subLayer; }
99 bool NeedsCachedStateUpdate()
const {
return m_appearanceChanged || m_iconSetChanged || m_layerChanged; }
101 void UpdateCachedState();
103 const IconSet* GetIconSet()
const {
return m_pIconSet; }
105 const IconDefinition& GetIconDefinition(
const IconDefinition::IdType& iconKey)
const {
return m_pIconSet->GetIconDefinition(iconKey); }
107 const MaterialSet* GetIconMaterialSet()
const {
return m_pIconMaterialSet; }
130 Rendering::LayerIds::Values m_layer;
133 bool m_appearanceChanged;
134 bool m_iconSetChanged;