From 67cf89fef19799902524a1f63b83ef6ea2b8fcc2 Mon Sep 17 00:00:00 2001 From: hyzboy Date: Thu, 5 Oct 2023 00:48:00 +0800 Subject: [PATCH] improved RenderablePrimitiveCreater --- inc/hgl/graph/VKRenderablePrimitiveCreater.h | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/inc/hgl/graph/VKRenderablePrimitiveCreater.h b/inc/hgl/graph/VKRenderablePrimitiveCreater.h index 99e05b90..8ea03181 100644 --- a/inc/hgl/graph/VKRenderablePrimitiveCreater.h +++ b/inc/hgl/graph/VKRenderablePrimitiveCreater.h @@ -22,26 +22,26 @@ public: prim=rr->CreatePrimitive(vertex_count); } - bool SetVBO(const AnsiString &name,const VkFormat &fmt,const void *buf) + VBO *SetVBO(const AnsiString &name,const VkFormat &fmt,const void *buf) { VBO *vbo=rr->CreateVBO(fmt,vertex_count,buf); if(!vbo) - return(false); + return(nullptr); prim->Set(name,vbo); - return(true); + return(vbo); } - bool SetIBO(const IndexType &it,const void *buf,const uint32_t index_count) + IndexBuffer *SetIBO(const IndexType &it,const void *buf,const uint32_t index_count) { IndexBuffer *ibo=rr->CreateIBO(it,index_count,buf); if(!ibo) - return(false); + return(nullptr); prim->Set(ibo); - return(true); + return(ibo); } Renderable *Create(MaterialInstance *mi,Pipeline *p)