From 0c669807d78fa8a533a181b6482b42c9989c66f2 Mon Sep 17 00:00:00 2001 From: hyzboy Date: Fri, 26 Jul 2024 03:27:32 +0800 Subject: [PATCH] [WIP]preparing fix DrawText.cpp --- CMCMakeModule | 2 +- CMCore | 2 +- CMPlatform | 2 +- CMSceneGraph | 2 +- CMUtil | 2 +- example/Basic/CMakeLists.txt | 2 +- example/GUI/CMakeLists.txt | 1 + example/{Vulkan => GUI}/DrawText.cpp | 15 ++++++++++----- 8 files changed, 17 insertions(+), 11 deletions(-) rename example/{Vulkan => GUI}/DrawText.cpp (80%) diff --git a/CMCMakeModule b/CMCMakeModule index ca9aece2..4c9dd190 160000 --- a/CMCMakeModule +++ b/CMCMakeModule @@ -1 +1 @@ -Subproject commit ca9aece201dd581c0576fe5448162686081261ff +Subproject commit 4c9dd190ad257ec00b21b79f8e7f676a36c0a96d diff --git a/CMCore b/CMCore index 8bb99765..1fab7b4e 160000 --- a/CMCore +++ b/CMCore @@ -1 +1 @@ -Subproject commit 8bb9976503947b89d181e6957afe801c62d8d9d9 +Subproject commit 1fab7b4ef20aad87628b69df6a7b3206c377501d diff --git a/CMPlatform b/CMPlatform index 3b769e69..103b0d84 160000 --- a/CMPlatform +++ b/CMPlatform @@ -1 +1 @@ -Subproject commit 3b769e692b3e2dc43dba9c682f7e899d2115eac7 +Subproject commit 103b0d845dc9fdbc10e2e40ab0fa346d133dc1ae diff --git a/CMSceneGraph b/CMSceneGraph index 821bd3f4..fb5a5cb0 160000 --- a/CMSceneGraph +++ b/CMSceneGraph @@ -1 +1 @@ -Subproject commit 821bd3f4f056ad344a45c631aeb6c5d94579f0ee +Subproject commit fb5a5cb066547646367942dc4ec0f9b65a6a7da6 diff --git a/CMUtil b/CMUtil index 09965c14..259f0ef4 160000 --- a/CMUtil +++ b/CMUtil @@ -1 +1 @@ -Subproject commit 09965c1492755a00015f9f030043002c92edb9a5 +Subproject commit 259f0ef40c46c7cb6fadc4f9402e100c352df9d9 diff --git a/example/Basic/CMakeLists.txt b/example/Basic/CMakeLists.txt index f262ce0f..93de6fd9 100644 --- a/example/Basic/CMakeLists.txt +++ b/example/Basic/CMakeLists.txt @@ -15,4 +15,4 @@ CreateProject(02_draw_triangle_use_UBO draw_triangle_use_UBO.cpp) CreateProject(03_auto_instance auto_instance.cpp) CreateProject(04_auto_merge_material_instance auto_merge_material_instance.cpp) -CreateProject(05_Billboard BillboardTest.cpp) \ No newline at end of file +CreateProject(05_Billboard BillboardTest.cpp) diff --git a/example/GUI/CMakeLists.txt b/example/GUI/CMakeLists.txt index 20d143bd..26d211c6 100644 --- a/example/GUI/CMakeLists.txt +++ b/example/GUI/CMakeLists.txt @@ -11,3 +11,4 @@ endmacro() CreateProject(00.control_point_2d control_point_2d.cpp) CreateProject(01.align_test align_test.cpp) +CreateProject(02.TextDrawTest DrawText.cpp) \ No newline at end of file diff --git a/example/Vulkan/DrawText.cpp b/example/GUI/DrawText.cpp similarity index 80% rename from example/Vulkan/DrawText.cpp rename to example/GUI/DrawText.cpp index 239c052e..31ab7cf1 100644 --- a/example/Vulkan/DrawText.cpp +++ b/example/GUI/DrawText.cpp @@ -1,4 +1,4 @@ -#include +#include #include #include"VulkanAppFramework.h" @@ -8,7 +8,7 @@ using namespace hgl::graph; constexpr uint32_t SCREEN_WIDTH =1280; constexpr uint32_t SCREEN_HEIGHT=SCREEN_WIDTH/16*9; -class TestApp:public VulkanApplicationFramework +class TestApp:public CameraAppFramework { private: @@ -61,16 +61,21 @@ public: if(!InitTextRenderable()) return(false); - BuildCommandBuffer(render_obj); + VulkanApplicationFramework::BuildCommandBuffer(render_obj); return(true); } - void Resize(int w,int h)override + void Resize(uint w,uint h)override { VulkanApplicationFramework::Resize(w,h); - BuildCommandBuffer(render_obj); + VulkanApplicationFramework::BuildCommandBuffer(render_obj); + } + + void BuildCommandBuffer(uint32_t index) + { + VulkanApplicationFramework::BuildCommandBuffer(index,render_obj); } };//class TestApp:public VulkanApplicationFramework