diff --git a/example/Vulkan/Geometry2D.cpp b/example/Vulkan/Geometry2D.cpp index 34472d4a..75eb1599 100644 --- a/example/Vulkan/Geometry2D.cpp +++ b/example/Vulkan/Geometry2D.cpp @@ -25,18 +25,18 @@ class TestApp:public VulkanApplicationFramework private: - SceneNode render_root; - RenderList render_list; + SceneNode render_root; + RenderList render_list; Material * material =nullptr; MaterialInstance * material_instance =nullptr; - Renderable *ro_rectangle =nullptr, - *ro_circle =nullptr, - *ro_round_rectangle =nullptr; + Renderable * ro_rectangle =nullptr; + Renderable * ro_circle =nullptr; + Renderable * ro_round_rectangle =nullptr; - GPUBuffer * ubo_world_matrix =nullptr; - GPUBuffer * ubo_color_material =nullptr; + GPUBuffer * ubo_world_matrix =nullptr; + GPUBuffer * ubo_color_material =nullptr; Pipeline * pipeline =nullptr; diff --git a/example/Vulkan/InlineGeometryScene.cpp b/example/Vulkan/InlineGeometryScene.cpp index ee4927e5..b8651891 100644 --- a/example/Vulkan/InlineGeometryScene.cpp +++ b/example/Vulkan/InlineGeometryScene.cpp @@ -271,8 +271,11 @@ public: void BuildCommandBuffer(uint32_t index) override { render_root.RefreshMatrix(); - render_list.Clear(); + render_list.Begin(); render_root.ExpendToList(&render_list); + render_list.End(); + + VulkanApplicationFramework::BuildCommandBuffer(index,&render_list); } diff --git a/inc/hgl/graph/RenderList.h b/inc/hgl/graph/RenderList.h index 50f52f25..6b20bea8 100644 --- a/inc/hgl/graph/RenderList.h +++ b/inc/hgl/graph/RenderList.h @@ -57,7 +57,7 @@ namespace hgl public: RenderList(); - ~RenderList()=default; + virtual ~RenderList()=default; void Begin (); void Add (SceneNode *); diff --git a/inc/hgl/graph/VKRenderable.h b/inc/hgl/graph/VKRenderable.h index 815d7322..4e03f767 100644 --- a/inc/hgl/graph/VKRenderable.h +++ b/inc/hgl/graph/VKRenderable.h @@ -83,7 +83,7 @@ public: const int GetBufferCount()const{return buffer_list.GetCount();} IndexBuffer * GetIndexBuffer() {return indices_buffer;} - const VkDeviceSize GetIndexBufferOffset()const {return indices_offset;} + const VkDeviceSize GetIndexBufferOffset()const {return indices_offset;} };//class Renderable VK_NAMESPACE_END #endif//HGL_GRAPH_VULKAN_RENDERABLE_INCLUDE diff --git a/src/SceneGraph/SceneNode.cpp b/src/SceneGraph/SceneNode.cpp index 700cbda7..e14b61a0 100644 --- a/src/SceneGraph/SceneNode.cpp +++ b/src/SceneGraph/SceneNode.cpp @@ -51,7 +51,6 @@ namespace hgl } LocalBoundingBox=local; - } /**