ULRE/inc/hgl/graph/font/TextPrimitive.h

51 lines
1.3 KiB
C
Raw Normal View History

2022-06-24 17:51:39 +08:00
#ifndef HGL_GRAPH_FONT_PRIMITIVE_INCLUDE
#define HGL_GRAPH_FONT_PRIMITIVE_INCLUDE
#include<hgl/graph/VKPrimitive.h>
namespace hgl
{
namespace graph
{
/**
*
*/
class TextPrimitive:public Primitive
{
VulkanDevice * device;
2022-06-24 17:51:39 +08:00
Material * mtl;
uint max_count; ///<缓冲区最大容量
2024-04-24 01:38:55 +08:00
VAB * vab_position;
VAB * vab_tex_coord;
2022-06-24 17:51:39 +08:00
protected:
friend class TextLayout;
friend class TextRender;
2024-11-21 01:30:42 +08:00
SortedSet<u32char> chars_sets;
2022-06-24 17:51:39 +08:00
2024-11-21 01:30:42 +08:00
const SortedSet<u32char> &GetCharsSets()const{return chars_sets;}
void SetCharsSets(const SortedSet<u32char> &sl){chars_sets=sl;}
2022-06-24 17:51:39 +08:00
void ClearCharsSets(){chars_sets.Clear();}
private:
virtual ~TextPrimitive();
public:
TextPrimitive(VulkanDevice *,Material *,uint mc=1024);
2022-06-24 17:51:39 +08:00
public:
void SetCharCount (const uint);
bool WriteVertex (const int16 *fp);
bool WriteTexCoord (const float *fp);
2025-05-18 02:03:16 +08:00
};//class TextPrimitive:public Mesh
2022-06-24 17:51:39 +08:00
}//namespace graph
}//namespace hgl
#endif//HGL_GRAPH_FONT_PRIMITIVE_INCLUDE