From 07092da04747d608977fe4fb1b7d046249b4177c Mon Sep 17 00:00:00 2001 From: hyzboy Date: Fri, 11 Mar 2022 17:38:21 +0800 Subject: [PATCH] used newly GetColor3f/4f --- CMCore | 2 +- CMPlatform | 2 +- CMSceneGraph | 2 +- example/common/VulkanAppFramework.h | 5 +++-- src/SceneGraph/font/TextRender.cpp | 5 +++-- 5 files changed, 9 insertions(+), 7 deletions(-) diff --git a/CMCore b/CMCore index 716407fa..1aa976a3 160000 --- a/CMCore +++ b/CMCore @@ -1 +1 @@ -Subproject commit 716407fa2d16b17efa51c70396e6518fc7275676 +Subproject commit 1aa976a30aaf9108a8e9ecb1ea1e68da24cac4d4 diff --git a/CMPlatform b/CMPlatform index 4f63548f..afd66d8f 160000 --- a/CMPlatform +++ b/CMPlatform @@ -1 +1 @@ -Subproject commit 4f63548fc234d2dd4b2d9bdd2a70cd42cb66fa63 +Subproject commit afd66d8f400eab3858efea22b5862194995ef642 diff --git a/CMSceneGraph b/CMSceneGraph index 4eaa9c9f..846113e0 160000 --- a/CMSceneGraph +++ b/CMSceneGraph @@ -1 +1 @@ -Subproject commit 4eaa9c9f5b9ae1aa3dcae63b239000113c84d1c8 +Subproject commit 846113e0fbb9f354300c21052c2c4ff0440c6dc6 diff --git a/example/common/VulkanAppFramework.h b/example/common/VulkanAppFramework.h index 3fe629a3..aaf8443d 100644 --- a/example/common/VulkanAppFramework.h +++ b/example/common/VulkanAppFramework.h @@ -20,6 +20,7 @@ #include #include #include +#include #include //#include @@ -170,9 +171,9 @@ public: ubo_camera_info->Write(&camera->info); } - void SetClearColor(COLOR cc) + void SetClearColor(const Color4f &cc) { - clear_color.Use(cc,1.0); + clear_color=cc; } void OnResize(uint w,uint h) override diff --git a/src/SceneGraph/font/TextRender.cpp b/src/SceneGraph/font/TextRender.cpp index dd992054..0b7c0c10 100644 --- a/src/SceneGraph/font/TextRender.cpp +++ b/src/SceneGraph/font/TextRender.cpp @@ -4,6 +4,7 @@ #include #include #include +#include namespace hgl { @@ -50,8 +51,8 @@ namespace hgl CharLayoutAttr cla; TextLayoutAttribute tla; - cla.CharColor=Color4f(COLOR::White); - cla.BackgroundColor=Color4f(COLOR::Black); + cla.CharColor=GetColor4f(COLOR::White,1.0); + cla.BackgroundColor.Zero(); tla.char_layout_attr=&cla; tla.line_gap=0.1f;