2018-10-07 03:42:33 +00:00
|
|
|
#pragma once
|
2017-01-29 03:58:16 +00:00
|
|
|
|
2019-09-29 02:22:12 +00:00
|
|
|
#include <array>
|
|
|
|
|
2019-09-28 02:53:03 +00:00
|
|
|
#include "Runtime/GuiSys/CGuiWidget.hpp"
|
|
|
|
|
2020-09-28 20:54:40 +00:00
|
|
|
#include "zeus/CColor.hpp"
|
|
|
|
#include "zeus/CMatrix4f.hpp"
|
|
|
|
#include "zeus/CVector2f.hpp"
|
|
|
|
#include "zeus/CVector2i.hpp"
|
|
|
|
#include "zeus/CVector3f.hpp"
|
2017-01-29 03:58:16 +00:00
|
|
|
|
2018-12-08 05:30:43 +00:00
|
|
|
namespace urde {
|
2017-01-29 03:58:16 +00:00
|
|
|
class CGlyph;
|
2017-01-30 06:58:59 +00:00
|
|
|
class CFontImageDef;
|
2019-09-29 00:30:53 +00:00
|
|
|
class CTextRenderBuffer;
|
2017-01-29 03:58:16 +00:00
|
|
|
|
2018-12-08 05:30:43 +00:00
|
|
|
class CTextSupportShader {
|
|
|
|
friend class CTextRenderBuffer;
|
|
|
|
|
|
|
|
struct Uniform {
|
2020-09-28 20:54:40 +00:00
|
|
|
hsh::float4x4 m_mvp;
|
|
|
|
hsh::float4 m_uniformColor;
|
2018-12-08 05:30:43 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
struct CharacterInstance {
|
2020-09-28 20:54:40 +00:00
|
|
|
std::array<hsh::float3, 4> m_pos;
|
|
|
|
std::array<hsh::float2, 4> m_uv;
|
|
|
|
hsh::float4 m_fontColor;
|
|
|
|
hsh::float4 m_outlineColor;
|
|
|
|
hsh::float4 m_mulColor;
|
2018-12-08 05:30:43 +00:00
|
|
|
void SetMetrics(const CGlyph& glyph, const zeus::CVector2i& offset);
|
|
|
|
};
|
|
|
|
|
|
|
|
struct ImageInstance {
|
2020-09-28 20:54:40 +00:00
|
|
|
std::array<hsh::float3, 4> m_pos;
|
|
|
|
std::array<hsh::float2, 4> m_uv;
|
|
|
|
hsh::float4 m_color;
|
2018-12-08 05:30:43 +00:00
|
|
|
void SetMetrics(const CFontImageDef& imgDef, const zeus::CVector2i& offset);
|
|
|
|
};
|
2017-01-29 03:58:16 +00:00
|
|
|
};
|
|
|
|
|
2018-12-08 05:30:43 +00:00
|
|
|
} // namespace urde
|