From c6674028580aae4ff0ab7c3549ca1f6c32ba8595 Mon Sep 17 00:00:00 2001 From: hyzboy Date: Wed, 29 May 2019 22:56:16 +0800 Subject: [PATCH] =?UTF-8?q?=E6=97=8B=E8=BD=AC=E9=9C=80=E8=A6=81=E4=BC=A0?= =?UTF-8?q?=E9=80=92=E5=BC=A7=E5=BA=A6=E8=80=8C=E9=9D=9E=E8=A7=92=E5=BA=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- 3rdpty/dl_assimp.sh | 1 + CMakeLists.txt | 2 ++ cmake/compiler.cmake | 2 +- example/Vulkan/Geometry3D.cpp | 10 ++++++---- 4 files changed, 10 insertions(+), 5 deletions(-) create mode 100644 3rdpty/dl_assimp.sh diff --git a/3rdpty/dl_assimp.sh b/3rdpty/dl_assimp.sh new file mode 100644 index 00000000..3277a69c --- /dev/null +++ b/3rdpty/dl_assimp.sh @@ -0,0 +1 @@ +git clone https://github.com/assimp/assimp.git \ No newline at end of file diff --git a/CMakeLists.txt b/CMakeLists.txt index 90a0fe44..ec7b24a1 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -48,6 +48,7 @@ add_subdirectory(${SPIRV_CROSS_PATH}) add_subdirectory(3rdpty/MathGeoLib) add_subdirectory(3rdpty/NvTriStrip) +add_subdirectory(3rdpty/assimp) add_subdirectory(src) SET(ULRE ULRE.Base @@ -57,6 +58,7 @@ SET(ULRE ULRE.Base ULRE.Platform MathGeoLib spirv-cross-core + assimp # jsoncpp_lib ${RENDER_LIBRARY} ${Vulkan_LIBRARIES}) diff --git a/cmake/compiler.cmake b/cmake/compiler.cmake index 243c918b..d7f5bca3 100644 --- a/cmake/compiler.cmake +++ b/cmake/compiler.cmake @@ -10,7 +10,7 @@ SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /std:c++14") - add_compile_options(/GR- /arch:AVX2) + add_compile_options(/arch:AVX2) add_definitions(-D_CRT_SECURE_NO_WARNINGS) ELSE() diff --git a/example/Vulkan/Geometry3D.cpp b/example/Vulkan/Geometry3D.cpp index b55f0293..e8d29510 100644 --- a/example/Vulkan/Geometry3D.cpp +++ b/example/Vulkan/Geometry3D.cpp @@ -13,8 +13,8 @@ using namespace hgl::graph; bool SaveToFile(const OSString &filename,VK_NAMESPACE::PipelineCreater *pc); bool LoadFromFile(const OSString &filename,VK_NAMESPACE::PipelineCreater *pc); -constexpr uint32_t SCREEN_WIDTH=128; -constexpr uint32_t SCREEN_HEIGHT=128; +constexpr uint32_t SCREEN_WIDTH=1280; +constexpr uint32_t SCREEN_HEIGHT=720; class TestApp:public VulkanApplicationFramework { @@ -152,9 +152,11 @@ private: bool InitScene() { + const float rad90=hgl_ang2rad(90); + render_root.Add(db->CreateRenderableInstance(pipeline_line,descriptor_sets,ro_plane_grid[0])); - render_root.Add(db->CreateRenderableInstance(pipeline_line,descriptor_sets,ro_plane_grid[1]),rotate(90,0,1,0)); - render_root.Add(db->CreateRenderableInstance(pipeline_line,descriptor_sets,ro_plane_grid[2]),rotate(90,1,0,0)); + render_root.Add(db->CreateRenderableInstance(pipeline_line,descriptor_sets,ro_plane_grid[1]),rotate(rad90,0,1,0)); + render_root.Add(db->CreateRenderableInstance(pipeline_line,descriptor_sets,ro_plane_grid[2]),rotate(rad90,1,0,0)); render_root.RefreshMatrix(); render_root.ExpendToList(&render_list);