renamed to Primitive from Renderable
This commit is contained in:
@@ -11,7 +11,7 @@ namespace hgl
|
||||
namespace graph
|
||||
{
|
||||
class TileFont;
|
||||
class TextRenderable;
|
||||
class TextPrimitive;
|
||||
|
||||
/**
|
||||
* 字符属性,可精确到字也可精确到段落或是全文
|
||||
@@ -112,7 +112,7 @@ namespace hgl
|
||||
|
||||
ObjectList<CharDrawAttr> draw_chars_list; ///<所有字符属性列表
|
||||
|
||||
template<typename T> bool preprocess(TextRenderable *,TileFont *,const T *,const int);
|
||||
template<typename T> bool preprocess(TextPrimitive *,TileFont *,const T *,const int);
|
||||
|
||||
protected:
|
||||
|
||||
@@ -124,7 +124,7 @@ namespace hgl
|
||||
int sl_v_r2l();
|
||||
int sl_v_l2r();
|
||||
|
||||
template<typename T> int SimpleLayout(TextRenderable *,TileFont *,const String<T> &); ///<简易排版
|
||||
template<typename T> int SimpleLayout(TextPrimitive *,TileFont *,const String<T> &); ///<简易排版
|
||||
|
||||
// template<typename T> int SimpleLayout(TileFont *,const StringList<String<T>> &); ///<简易排版
|
||||
|
||||
@@ -142,7 +142,7 @@ namespace hgl
|
||||
|
||||
protected:
|
||||
|
||||
TextRenderable *text_render_obj;
|
||||
TextPrimitive *text_render_obj;
|
||||
MemBlock<int16> vertex;
|
||||
MemBlock<float> tex_coord;
|
||||
|
||||
@@ -167,8 +167,8 @@ namespace hgl
|
||||
|
||||
virtual bool Init (); ///<初始化排版
|
||||
|
||||
int SimpleLayout (TextRenderable *,TileFont *,const UTF16String &); ///<简易排版
|
||||
int SimpleLayout (TextRenderable *,TileFont *,const UTF32String &); ///<简易排版
|
||||
int SimpleLayout (TextPrimitive *,TileFont *,const UTF16String &); ///<简易排版
|
||||
int SimpleLayout (TextPrimitive *,TileFont *,const UTF32String &); ///<简易排版
|
||||
|
||||
// int SimpleLayout (TileFont *,const UTF16StringList &); ///<简易排版
|
||||
// int SimpleLayout (TileFont *,const UTF32StringList &); ///<简易排版
|
||||
|
@@ -11,7 +11,7 @@ namespace hgl
|
||||
class FontSource;
|
||||
class TileFont;
|
||||
class TextLayout;
|
||||
class TextRenderable;
|
||||
class TextPrimitive;
|
||||
|
||||
class TextRender
|
||||
{
|
||||
@@ -33,7 +33,7 @@ namespace hgl
|
||||
Color4f color;
|
||||
GPUBuffer * ubo_color;
|
||||
|
||||
SortedSets<TextRenderable *> tr_sets;
|
||||
SortedSets<TextPrimitive *> tr_sets;
|
||||
|
||||
private:
|
||||
|
||||
@@ -53,14 +53,14 @@ namespace hgl
|
||||
|
||||
public:
|
||||
|
||||
TextRenderable *CreateRenderable();
|
||||
TextRenderable *CreateRenderable(const UTF16String &str);
|
||||
TextPrimitive *CreatePrimitive();
|
||||
TextPrimitive *CreatePrimitive(const UTF16String &str);
|
||||
|
||||
bool Layout(TextRenderable *tr,const UTF16String &str);
|
||||
bool Layout(TextPrimitive *tr,const UTF16String &str);
|
||||
|
||||
RenderableInstance *CreateRenderableInstance(TextRenderable *text_render_obj);
|
||||
RenderableInstance *CreateRenderableInstance(TextPrimitive *text_render_obj);
|
||||
|
||||
void Release(TextRenderable *);
|
||||
void Release(TextPrimitive *);
|
||||
};//class TextRender
|
||||
|
||||
/**
|
||||
|
@@ -1,50 +0,0 @@
|
||||
#ifndef HGL_GRAPH_TEXT_RENDERABLE_INCLUDE
|
||||
#define HGL_GRAPH_TEXT_RENDERABLE_INCLUDE
|
||||
|
||||
#include<hgl/graph/VKRenderable.h>
|
||||
namespace hgl
|
||||
{
|
||||
namespace graph
|
||||
{
|
||||
/**
|
||||
* 文本可渲染对象
|
||||
*/
|
||||
class TextRenderable:public Renderable
|
||||
{
|
||||
GPUDevice * device;
|
||||
Material * mtl;
|
||||
|
||||
uint max_count; ///<缓冲区最大容量
|
||||
|
||||
VBO * vbo_position;
|
||||
VBO * vbo_tex_coord;
|
||||
|
||||
protected:
|
||||
|
||||
friend class TextLayout;
|
||||
friend class TextRender;
|
||||
|
||||
SortedSets<u32char> chars_sets;
|
||||
|
||||
const SortedSets<u32char> &GetCharsSets()const{return chars_sets;}
|
||||
void SetCharsSets(const SortedSets<u32char> &sl){chars_sets=sl;}
|
||||
void ClearCharsSets(){chars_sets.Clear();}
|
||||
|
||||
private:
|
||||
|
||||
virtual ~TextRenderable();
|
||||
|
||||
public:
|
||||
|
||||
TextRenderable(GPUDevice *,Material *,uint mc=1024);
|
||||
|
||||
public:
|
||||
|
||||
void SetCharCount (const uint);
|
||||
|
||||
bool WriteVertex (const int16 *fp);
|
||||
bool WriteTexCoord (const float *fp);
|
||||
};//class TextRenderable:public Renderable
|
||||
}//namespace graph
|
||||
}//namespace hgl
|
||||
#endif//HGL_GRAPH_TEXT_RENDERABLE_INCLUDE
|
Reference in New Issue
Block a user