renamed to render_obj from render_instance
This commit is contained in:
parent
d8d8d97abd
commit
e381c3efeb
@ -36,7 +36,7 @@ private:
|
|||||||
Camera cam;
|
Camera cam;
|
||||||
|
|
||||||
MaterialInstance * material_instance =nullptr;
|
MaterialInstance * material_instance =nullptr;
|
||||||
Renderable *render_instance =nullptr;
|
Renderable * render_obj =nullptr;
|
||||||
GPUBuffer * ubo_camera_info =nullptr;
|
GPUBuffer * ubo_camera_info =nullptr;
|
||||||
GPUBuffer * ubo_color_material =nullptr;
|
GPUBuffer * ubo_color_material =nullptr;
|
||||||
GPUBuffer * ubo_line_config =nullptr;
|
GPUBuffer * ubo_line_config =nullptr;
|
||||||
@ -118,7 +118,7 @@ private:
|
|||||||
|
|
||||||
if(!primitive->Set(VAN::Position, db->CreateVBO(VF_V2F,VERTEX_COUNT,position_data)))return(false);
|
if(!primitive->Set(VAN::Position, db->CreateVBO(VF_V2F,VERTEX_COUNT,position_data)))return(false);
|
||||||
|
|
||||||
render_instance=db->CreateRenderable(primitive,material_instance,pipeline);
|
render_obj=db->CreateRenderable(primitive,material_instance,pipeline);
|
||||||
return(true);
|
return(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -138,7 +138,7 @@ public:
|
|||||||
if(!InitVBO())
|
if(!InitVBO())
|
||||||
return(false);
|
return(false);
|
||||||
|
|
||||||
BuildCommandBuffer(render_instance);
|
BuildCommandBuffer(render_obj);
|
||||||
|
|
||||||
return(true);
|
return(true);
|
||||||
}
|
}
|
||||||
@ -152,7 +152,7 @@ public:
|
|||||||
|
|
||||||
ubo_camera_info->Write(&cam.info);
|
ubo_camera_info->Write(&cam.info);
|
||||||
|
|
||||||
BuildCommandBuffer(render_instance);
|
BuildCommandBuffer(render_obj);
|
||||||
}
|
}
|
||||||
};//class TestApp:public VulkanApplicationFramework
|
};//class TestApp:public VulkanApplicationFramework
|
||||||
|
|
||||||
|
@ -36,7 +36,7 @@ private:
|
|||||||
Camera cam;
|
Camera cam;
|
||||||
|
|
||||||
MaterialInstance * material_instance =nullptr;
|
MaterialInstance * material_instance =nullptr;
|
||||||
Renderable *render_instance =nullptr;
|
Renderable * render_obj =nullptr;
|
||||||
|
|
||||||
GPUBuffer * ubo_camera_info =nullptr;
|
GPUBuffer * ubo_camera_info =nullptr;
|
||||||
GPUBuffer * ubo_rb_config =nullptr;
|
GPUBuffer * ubo_rb_config =nullptr;
|
||||||
@ -134,7 +134,7 @@ private:
|
|||||||
|
|
||||||
if(!primitive->Set(VAN::Position, db->CreateVBO(VF_V4I16,VERTEX_COUNT,position_data)))return(false);
|
if(!primitive->Set(VAN::Position, db->CreateVBO(VF_V4I16,VERTEX_COUNT,position_data)))return(false);
|
||||||
|
|
||||||
render_instance=db->CreateRenderable(primitive,material_instance,pipeline);
|
render_obj=db->CreateRenderable(primitive,material_instance,pipeline);
|
||||||
return(true);
|
return(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -154,7 +154,7 @@ public:
|
|||||||
if(!InitVBO())
|
if(!InitVBO())
|
||||||
return(false);
|
return(false);
|
||||||
|
|
||||||
BuildCommandBuffer(render_instance);
|
BuildCommandBuffer(render_obj);
|
||||||
|
|
||||||
return(true);
|
return(true);
|
||||||
}
|
}
|
||||||
@ -168,7 +168,7 @@ public:
|
|||||||
|
|
||||||
ubo_camera_info->Write(&cam.info);
|
ubo_camera_info->Write(&cam.info);
|
||||||
|
|
||||||
BuildCommandBuffer(render_instance);
|
BuildCommandBuffer(render_obj);
|
||||||
}
|
}
|
||||||
};//class TestApp:public VulkanApplicationFramework
|
};//class TestApp:public VulkanApplicationFramework
|
||||||
|
|
||||||
|
@ -14,8 +14,8 @@ private:
|
|||||||
|
|
||||||
TextRender * text_render =nullptr;
|
TextRender * text_render =nullptr;
|
||||||
|
|
||||||
TextPrimitive * text_render_obj =nullptr;
|
TextPrimitive * text_primitive =nullptr;
|
||||||
Renderable *render_instance =nullptr;
|
Renderable * render_obj =nullptr;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
@ -40,12 +40,12 @@ private:
|
|||||||
if(!text_render)
|
if(!text_render)
|
||||||
return(false);
|
return(false);
|
||||||
|
|
||||||
text_render_obj=text_render->CreatePrimitive(str);
|
text_primitive=text_render->CreatePrimitive(str);
|
||||||
if(!text_render_obj)
|
if(!text_primitive)
|
||||||
return(false);
|
return(false);
|
||||||
|
|
||||||
render_instance=text_render->CreateRenderable(text_render_obj);
|
render_obj=text_render->CreateRenderable(text_primitive);
|
||||||
if(!render_instance)
|
if(!render_obj)
|
||||||
return(false);
|
return(false);
|
||||||
|
|
||||||
return(true);
|
return(true);
|
||||||
@ -61,7 +61,7 @@ public:
|
|||||||
if(!InitTextRenderable())
|
if(!InitTextRenderable())
|
||||||
return(false);
|
return(false);
|
||||||
|
|
||||||
BuildCommandBuffer(render_instance);
|
BuildCommandBuffer(render_obj);
|
||||||
|
|
||||||
return(true);
|
return(true);
|
||||||
}
|
}
|
||||||
@ -70,7 +70,7 @@ public:
|
|||||||
{
|
{
|
||||||
VulkanApplicationFramework::Resize(w,h);
|
VulkanApplicationFramework::Resize(w,h);
|
||||||
|
|
||||||
BuildCommandBuffer(render_instance);
|
BuildCommandBuffer(render_obj);
|
||||||
}
|
}
|
||||||
};//class TestApp:public VulkanApplicationFramework
|
};//class TestApp:public VulkanApplicationFramework
|
||||||
|
|
||||||
|
@ -41,7 +41,7 @@ private:
|
|||||||
Sampler * sampler =nullptr;
|
Sampler * sampler =nullptr;
|
||||||
MaterialInstance * material_instance =nullptr;
|
MaterialInstance * material_instance =nullptr;
|
||||||
Primitive * primitive =nullptr;
|
Primitive * primitive =nullptr;
|
||||||
Renderable *render_instance =nullptr;
|
Renderable * render_obj =nullptr;
|
||||||
|
|
||||||
Pipeline * pipeline =nullptr;
|
Pipeline * pipeline =nullptr;
|
||||||
|
|
||||||
@ -180,9 +180,9 @@ private:
|
|||||||
primitive->Set(VAN::Position,db->CreateVBO(VF_V4F,tile_count,position_data));
|
primitive->Set(VAN::Position,db->CreateVBO(VF_V4F,tile_count,position_data));
|
||||||
primitive->Set(VAN::TexCoord,db->CreateVBO(VF_V4F,tile_count,tex_coord_data));
|
primitive->Set(VAN::TexCoord,db->CreateVBO(VF_V4F,tile_count,tex_coord_data));
|
||||||
|
|
||||||
render_instance=db->CreateRenderable(primitive,material_instance,pipeline);
|
render_obj=db->CreateRenderable(primitive,material_instance,pipeline);
|
||||||
|
|
||||||
return(render_instance);
|
return(render_obj);
|
||||||
}
|
}
|
||||||
|
|
||||||
public:
|
public:
|
||||||
@ -204,7 +204,7 @@ public:
|
|||||||
if(!InitVBO())
|
if(!InitVBO())
|
||||||
return(false);
|
return(false);
|
||||||
|
|
||||||
BuildCommandBuffer(render_instance);
|
BuildCommandBuffer(render_obj);
|
||||||
|
|
||||||
return(true);
|
return(true);
|
||||||
}
|
}
|
||||||
@ -213,7 +213,7 @@ public:
|
|||||||
{
|
{
|
||||||
VulkanApplicationFramework::Resize(w,h);
|
VulkanApplicationFramework::Resize(w,h);
|
||||||
|
|
||||||
BuildCommandBuffer(render_instance);
|
BuildCommandBuffer(render_obj);
|
||||||
}
|
}
|
||||||
};//class TestApp:public VulkanApplicationFramework
|
};//class TestApp:public VulkanApplicationFramework
|
||||||
|
|
||||||
|
@ -32,7 +32,7 @@ class TestApp:public VulkanApplicationFramework
|
|||||||
private:
|
private:
|
||||||
|
|
||||||
MaterialInstance * material_instance =nullptr;
|
MaterialInstance * material_instance =nullptr;
|
||||||
Renderable *render_instance =nullptr;
|
Renderable * render_obj =nullptr;
|
||||||
|
|
||||||
Pipeline * pipeline =nullptr;
|
Pipeline * pipeline =nullptr;
|
||||||
|
|
||||||
@ -59,7 +59,7 @@ private:
|
|||||||
if(!primitive->Set(VAN::Position, db->CreateVBO(VF_V2F,VERTEX_COUNT,position_data)))return(false);
|
if(!primitive->Set(VAN::Position, db->CreateVBO(VF_V2F,VERTEX_COUNT,position_data)))return(false);
|
||||||
if(!primitive->Set(VAN::Color, db->CreateVBO(VF_V4F,VERTEX_COUNT,color_data)))return(false);
|
if(!primitive->Set(VAN::Color, db->CreateVBO(VF_V4F,VERTEX_COUNT,color_data)))return(false);
|
||||||
|
|
||||||
render_instance=db->CreateRenderable(primitive,material_instance,pipeline);
|
render_obj=db->CreateRenderable(primitive,material_instance,pipeline);
|
||||||
return(true);
|
return(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -76,7 +76,7 @@ public:
|
|||||||
if(!InitVBO())
|
if(!InitVBO())
|
||||||
return(false);
|
return(false);
|
||||||
|
|
||||||
if(!BuildCommandBuffer(render_instance))
|
if(!BuildCommandBuffer(render_obj))
|
||||||
return(false);
|
return(false);
|
||||||
|
|
||||||
return(true);
|
return(true);
|
||||||
@ -86,7 +86,7 @@ public:
|
|||||||
{
|
{
|
||||||
VulkanApplicationFramework::Resize(w,h);
|
VulkanApplicationFramework::Resize(w,h);
|
||||||
|
|
||||||
BuildCommandBuffer(render_instance);
|
BuildCommandBuffer(render_obj);
|
||||||
}
|
}
|
||||||
};//class TestApp:public VulkanApplicationFramework
|
};//class TestApp:public VulkanApplicationFramework
|
||||||
|
|
||||||
|
@ -38,7 +38,7 @@ private:
|
|||||||
Sampler * sampler =nullptr;
|
Sampler * sampler =nullptr;
|
||||||
MaterialInstance * material_instance =nullptr;
|
MaterialInstance * material_instance =nullptr;
|
||||||
Primitive * primitive =nullptr;
|
Primitive * primitive =nullptr;
|
||||||
Renderable *render_instance =nullptr;
|
Renderable * render_obj =nullptr;
|
||||||
|
|
||||||
Pipeline * pipeline =nullptr;
|
Pipeline * pipeline =nullptr;
|
||||||
|
|
||||||
@ -73,9 +73,9 @@ private:
|
|||||||
primitive->Set(VAN::Position,db->CreateVBO(VF_V4F,VERTEX_COUNT,position_data));
|
primitive->Set(VAN::Position,db->CreateVBO(VF_V4F,VERTEX_COUNT,position_data));
|
||||||
primitive->Set(VAN::TexCoord,db->CreateVBO(VF_V4F,VERTEX_COUNT,tex_coord_data));
|
primitive->Set(VAN::TexCoord,db->CreateVBO(VF_V4F,VERTEX_COUNT,tex_coord_data));
|
||||||
|
|
||||||
render_instance=db->CreateRenderable(primitive,material_instance,pipeline);
|
render_obj=db->CreateRenderable(primitive,material_instance,pipeline);
|
||||||
|
|
||||||
return(render_instance);
|
return(render_obj);
|
||||||
}
|
}
|
||||||
|
|
||||||
public:
|
public:
|
||||||
@ -91,7 +91,7 @@ public:
|
|||||||
if(!InitVBO())
|
if(!InitVBO())
|
||||||
return(false);
|
return(false);
|
||||||
|
|
||||||
BuildCommandBuffer(render_instance);
|
BuildCommandBuffer(render_obj);
|
||||||
|
|
||||||
return(true);
|
return(true);
|
||||||
}
|
}
|
||||||
@ -100,7 +100,7 @@ public:
|
|||||||
{
|
{
|
||||||
VulkanApplicationFramework::Resize(w,h);
|
VulkanApplicationFramework::Resize(w,h);
|
||||||
|
|
||||||
BuildCommandBuffer(render_instance);
|
BuildCommandBuffer(render_obj);
|
||||||
}
|
}
|
||||||
};//class TestApp:public VulkanApplicationFramework
|
};//class TestApp:public VulkanApplicationFramework
|
||||||
|
|
||||||
|
@ -32,7 +32,7 @@ class TestApp:public VulkanApplicationFramework
|
|||||||
private:
|
private:
|
||||||
|
|
||||||
MaterialInstance * material_instance =nullptr;
|
MaterialInstance * material_instance =nullptr;
|
||||||
Renderable *render_instance =nullptr;
|
Renderable * render_obj =nullptr;
|
||||||
|
|
||||||
Pipeline * pipeline =nullptr;
|
Pipeline * pipeline =nullptr;
|
||||||
|
|
||||||
@ -59,7 +59,7 @@ private:
|
|||||||
if(!primitive->Set(VAN::Position, db->CreateVBO(VF_V2F,VERTEX_COUNT,position_data)))return(false);
|
if(!primitive->Set(VAN::Position, db->CreateVBO(VF_V2F,VERTEX_COUNT,position_data)))return(false);
|
||||||
if(!primitive->Set(VAN::Color, db->CreateVBO(VF_V4F,VERTEX_COUNT,color_data)))return(false);
|
if(!primitive->Set(VAN::Color, db->CreateVBO(VF_V4F,VERTEX_COUNT,color_data)))return(false);
|
||||||
|
|
||||||
render_instance=db->CreateRenderable(primitive,material_instance,pipeline);
|
render_obj=db->CreateRenderable(primitive,material_instance,pipeline);
|
||||||
return(true);
|
return(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -76,7 +76,7 @@ public:
|
|||||||
if(!InitVBO())
|
if(!InitVBO())
|
||||||
return(false);
|
return(false);
|
||||||
|
|
||||||
if(!BuildCommandBuffer(render_instance))
|
if(!BuildCommandBuffer(render_obj))
|
||||||
return(false);
|
return(false);
|
||||||
|
|
||||||
return(true);
|
return(true);
|
||||||
@ -86,7 +86,7 @@ public:
|
|||||||
{
|
{
|
||||||
VulkanApplicationFramework::Resize(w,h);
|
VulkanApplicationFramework::Resize(w,h);
|
||||||
|
|
||||||
BuildCommandBuffer(render_instance);
|
BuildCommandBuffer(render_obj);
|
||||||
}
|
}
|
||||||
};//class TestApp:public VulkanApplicationFramework
|
};//class TestApp:public VulkanApplicationFramework
|
||||||
|
|
||||||
|
@ -32,7 +32,7 @@ class TestApp:public VulkanApplicationFramework
|
|||||||
private:
|
private:
|
||||||
|
|
||||||
MaterialInstance * material_instance =nullptr;
|
MaterialInstance * material_instance =nullptr;
|
||||||
Renderable *render_instance =nullptr;
|
Renderable * render_obj =nullptr;
|
||||||
|
|
||||||
Pipeline * pipeline =nullptr;
|
Pipeline * pipeline =nullptr;
|
||||||
|
|
||||||
@ -61,7 +61,7 @@ private:
|
|||||||
if(!primitive->Set(VAN::Position, db->CreateVBO(VF_V2F,VERTEX_COUNT,position_data)))return(false);
|
if(!primitive->Set(VAN::Position, db->CreateVBO(VF_V2F,VERTEX_COUNT,position_data)))return(false);
|
||||||
if(!primitive->Set(VAN::Color, db->CreateVBO(VF_V4F,VERTEX_COUNT,color_data)))return(false);
|
if(!primitive->Set(VAN::Color, db->CreateVBO(VF_V4F,VERTEX_COUNT,color_data)))return(false);
|
||||||
|
|
||||||
render_instance=db->CreateRenderable(primitive,material_instance,pipeline);
|
render_obj=db->CreateRenderable(primitive,material_instance,pipeline);
|
||||||
return(true);
|
return(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -78,7 +78,7 @@ public:
|
|||||||
if(!InitVBO())
|
if(!InitVBO())
|
||||||
return(false);
|
return(false);
|
||||||
|
|
||||||
if(!BuildCommandBuffer(render_instance))
|
if(!BuildCommandBuffer(render_obj))
|
||||||
return(false);
|
return(false);
|
||||||
|
|
||||||
return(true);
|
return(true);
|
||||||
@ -88,7 +88,7 @@ public:
|
|||||||
{
|
{
|
||||||
VulkanApplicationFramework::Resize(w,h);
|
VulkanApplicationFramework::Resize(w,h);
|
||||||
|
|
||||||
BuildCommandBuffer(render_instance);
|
BuildCommandBuffer(render_obj);
|
||||||
}
|
}
|
||||||
};//class TestApp:public VulkanApplicationFramework
|
};//class TestApp:public VulkanApplicationFramework
|
||||||
|
|
||||||
|
@ -34,7 +34,7 @@ private:
|
|||||||
RenderList * render_list =nullptr;
|
RenderList * render_list =nullptr;
|
||||||
|
|
||||||
MaterialInstance * material_instance =nullptr;
|
MaterialInstance * material_instance =nullptr;
|
||||||
Renderable *render_instance =nullptr;
|
Renderable * render_obj =nullptr;
|
||||||
|
|
||||||
Pipeline * pipeline =nullptr;
|
Pipeline * pipeline =nullptr;
|
||||||
|
|
||||||
@ -63,9 +63,9 @@ private:
|
|||||||
if(!primitive->Set(VAN::Position, db->CreateVBO(VF_V2F,VERTEX_COUNT,position_data)))return(false);
|
if(!primitive->Set(VAN::Position, db->CreateVBO(VF_V2F,VERTEX_COUNT,position_data)))return(false);
|
||||||
if(!primitive->Set(VAN::Color, db->CreateVBO(VF_V4F,VERTEX_COUNT,color_data)))return(false);
|
if(!primitive->Set(VAN::Color, db->CreateVBO(VF_V4F,VERTEX_COUNT,color_data)))return(false);
|
||||||
|
|
||||||
render_instance=db->CreateRenderable(primitive,material_instance,pipeline);
|
render_obj=db->CreateRenderable(primitive,material_instance,pipeline);
|
||||||
|
|
||||||
render_root.CreateSubNode(render_instance);
|
render_root.CreateSubNode(render_obj);
|
||||||
|
|
||||||
render_root.RefreshMatrix();
|
render_root.RefreshMatrix();
|
||||||
|
|
||||||
|
@ -142,7 +142,7 @@ namespace hgl
|
|||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
|
||||||
TextPrimitive *text_render_obj;
|
TextPrimitive *text_primitive;
|
||||||
MemBlock<int16> vertex;
|
MemBlock<int16> vertex;
|
||||||
MemBlock<float> tex_coord;
|
MemBlock<float> tex_coord;
|
||||||
|
|
||||||
@ -153,7 +153,7 @@ namespace hgl
|
|||||||
direction.text_direction=0;
|
direction.text_direction=0;
|
||||||
draw_chars_count=0;
|
draw_chars_count=0;
|
||||||
|
|
||||||
text_render_obj =nullptr;
|
text_primitive =nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual ~TextLayout()=default;
|
virtual ~TextLayout()=default;
|
||||||
|
@ -58,7 +58,7 @@ namespace hgl
|
|||||||
|
|
||||||
bool Layout(TextPrimitive *tr,const UTF16String &str);
|
bool Layout(TextPrimitive *tr,const UTF16String &str);
|
||||||
|
|
||||||
Renderable *CreateRenderable(TextPrimitive *text_render_obj);
|
Renderable *CreateRenderable(TextPrimitive *text_primitive);
|
||||||
|
|
||||||
void Release(TextPrimitive *);
|
void Release(TextPrimitive *);
|
||||||
};//class TextRender
|
};//class TextRender
|
||||||
|
@ -174,9 +174,9 @@ namespace hgl
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
Renderable *TextRender::CreateRenderable(TextPrimitive *text_render_obj)
|
Renderable *TextRender::CreateRenderable(TextPrimitive *text_primitive)
|
||||||
{
|
{
|
||||||
return db->CreateRenderable(text_render_obj,material_instance,pipeline);
|
return db->CreateRenderable(text_primitive,material_instance,pipeline);
|
||||||
}
|
}
|
||||||
|
|
||||||
void TextRender::Release(TextPrimitive *tr)
|
void TextRender::Release(TextPrimitive *tr)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user