diff --git a/CMakeLists.txt b/CMakeLists.txt index bb7b54bf3..f6129ef85 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -68,18 +68,18 @@ if (WICKED_EDITOR) endif() if (WICKED_TESTS) - add_subdirectory(Tests) + add_subdirectory(Samples/Tests) endif() if (WICKED_IMGUI_EXAMPLE) - add_subdirectory(Example_ImGui) - add_subdirectory(Example_ImGui_Docking) + add_subdirectory(Samples/Example_ImGui) + add_subdirectory(Samples/Example_ImGui_Docking) endif() if (WICKED_LINUX_TEMPLATE) - add_subdirectory(Template_Linux) + add_subdirectory(Samples/Template_Linux) endif() if (WICKED_WINDOWS_TEMPLATE) - add_subdirectory(Template_Windows) + add_subdirectory(Samples/Template_Windows) endif() diff --git a/Example_ImGui/CMakeLists.txt b/Samples/Example_ImGui/CMakeLists.txt similarity index 100% rename from Example_ImGui/CMakeLists.txt rename to Samples/Example_ImGui/CMakeLists.txt diff --git a/Example_ImGui/Example_ImGui.cpp b/Samples/Example_ImGui/Example_ImGui.cpp similarity index 99% rename from Example_ImGui/Example_ImGui.cpp rename to Samples/Example_ImGui/Example_ImGui.cpp index 8f9ed00e9..8775afc65 100644 --- a/Example_ImGui/Example_ImGui.cpp +++ b/Samples/Example_ImGui/Example_ImGui.cpp @@ -13,6 +13,8 @@ #include #include +#define CONTENT_DIR "../../Content/" + using namespace wi::ecs; using namespace wi::scene; using namespace wi::graphics; @@ -352,7 +354,7 @@ void Example_ImGuiRenderer::Load() wi::scene::GetCamera().TransformCamera(transform); // Load model. - wi::scene::LoadModel("../Content/models/teapot.wiscene"); + wi::scene::LoadModel(CONTENT_DIR "models/teapot.wiscene"); RenderPath3D::Load(); } diff --git a/Example_ImGui/Example_ImGui.h b/Samples/Example_ImGui/Example_ImGui.h similarity index 100% rename from Example_ImGui/Example_ImGui.h rename to Samples/Example_ImGui/Example_ImGui.h diff --git a/Example_ImGui/Example_ImGui.vcxproj b/Samples/Example_ImGui/Example_ImGui.vcxproj similarity index 97% rename from Example_ImGui/Example_ImGui.vcxproj rename to Samples/Example_ImGui/Example_ImGui.vcxproj index c33102f28..3682891d9 100644 --- a/Example_ImGui/Example_ImGui.vcxproj +++ b/Samples/Example_ImGui/Example_ImGui.vcxproj @@ -135,23 +135,6 @@ - - - {06163dcb-b183-4ed9-9c62-13ef1658e049} - - - - - true - Document - true - - - true - Document - true - - Document @@ -163,6 +146,23 @@ + + + {06163dcb-b183-4ed9-9c62-13ef1658e049} + + + + + true + true + Document + + + true + true + Document + + diff --git a/Example_ImGui/Example_ImGui.vcxproj.filters b/Samples/Example_ImGui/Example_ImGui.vcxproj.filters similarity index 94% rename from Example_ImGui/Example_ImGui.vcxproj.filters rename to Samples/Example_ImGui/Example_ImGui.vcxproj.filters index 07555a08d..12f2270e9 100644 --- a/Example_ImGui/Example_ImGui.vcxproj.filters +++ b/Samples/Example_ImGui/Example_ImGui.vcxproj.filters @@ -85,14 +85,16 @@ - - + Resource Files + + + \ No newline at end of file diff --git a/Example_ImGui/ImGui/LICENSE.txt b/Samples/Example_ImGui/ImGui/LICENSE.txt similarity index 100% rename from Example_ImGui/ImGui/LICENSE.txt rename to Samples/Example_ImGui/ImGui/LICENSE.txt diff --git a/Example_ImGui/ImGui/imconfig.h b/Samples/Example_ImGui/ImGui/imconfig.h similarity index 100% rename from Example_ImGui/ImGui/imconfig.h rename to Samples/Example_ImGui/ImGui/imconfig.h diff --git a/Example_ImGui/ImGui/imgui.cpp b/Samples/Example_ImGui/ImGui/imgui.cpp similarity index 100% rename from Example_ImGui/ImGui/imgui.cpp rename to Samples/Example_ImGui/ImGui/imgui.cpp diff --git a/Example_ImGui/ImGui/imgui.h b/Samples/Example_ImGui/ImGui/imgui.h similarity index 100% rename from Example_ImGui/ImGui/imgui.h rename to Samples/Example_ImGui/ImGui/imgui.h diff --git a/Example_ImGui/ImGui/imgui_demo.cpp b/Samples/Example_ImGui/ImGui/imgui_demo.cpp similarity index 100% rename from Example_ImGui/ImGui/imgui_demo.cpp rename to Samples/Example_ImGui/ImGui/imgui_demo.cpp diff --git a/Example_ImGui/ImGui/imgui_draw.cpp b/Samples/Example_ImGui/ImGui/imgui_draw.cpp similarity index 100% rename from Example_ImGui/ImGui/imgui_draw.cpp rename to Samples/Example_ImGui/ImGui/imgui_draw.cpp diff --git a/Example_ImGui/ImGui/imgui_impl_sdl.cpp b/Samples/Example_ImGui/ImGui/imgui_impl_sdl.cpp similarity index 100% rename from Example_ImGui/ImGui/imgui_impl_sdl.cpp rename to Samples/Example_ImGui/ImGui/imgui_impl_sdl.cpp diff --git a/Example_ImGui/ImGui/imgui_impl_sdl.h b/Samples/Example_ImGui/ImGui/imgui_impl_sdl.h similarity index 100% rename from Example_ImGui/ImGui/imgui_impl_sdl.h rename to Samples/Example_ImGui/ImGui/imgui_impl_sdl.h diff --git a/Example_ImGui/ImGui/imgui_impl_win32.cpp b/Samples/Example_ImGui/ImGui/imgui_impl_win32.cpp similarity index 100% rename from Example_ImGui/ImGui/imgui_impl_win32.cpp rename to Samples/Example_ImGui/ImGui/imgui_impl_win32.cpp diff --git a/Example_ImGui/ImGui/imgui_impl_win32.h b/Samples/Example_ImGui/ImGui/imgui_impl_win32.h similarity index 100% rename from Example_ImGui/ImGui/imgui_impl_win32.h rename to Samples/Example_ImGui/ImGui/imgui_impl_win32.h diff --git a/Example_ImGui/ImGui/imgui_internal.h b/Samples/Example_ImGui/ImGui/imgui_internal.h similarity index 100% rename from Example_ImGui/ImGui/imgui_internal.h rename to Samples/Example_ImGui/ImGui/imgui_internal.h diff --git a/Example_ImGui/ImGui/imgui_tables.cpp b/Samples/Example_ImGui/ImGui/imgui_tables.cpp similarity index 100% rename from Example_ImGui/ImGui/imgui_tables.cpp rename to Samples/Example_ImGui/ImGui/imgui_tables.cpp diff --git a/Example_ImGui/ImGui/imgui_widgets.cpp b/Samples/Example_ImGui/ImGui/imgui_widgets.cpp similarity index 100% rename from Example_ImGui/ImGui/imgui_widgets.cpp rename to Samples/Example_ImGui/ImGui/imgui_widgets.cpp diff --git a/Example_ImGui/ImGui/imstb_rectpack.h b/Samples/Example_ImGui/ImGui/imstb_rectpack.h similarity index 100% rename from Example_ImGui/ImGui/imstb_rectpack.h rename to Samples/Example_ImGui/ImGui/imstb_rectpack.h diff --git a/Example_ImGui/ImGui/imstb_textedit.h b/Samples/Example_ImGui/ImGui/imstb_textedit.h similarity index 100% rename from Example_ImGui/ImGui/imstb_textedit.h rename to Samples/Example_ImGui/ImGui/imstb_textedit.h diff --git a/Example_ImGui/ImGui/imstb_truetype.h b/Samples/Example_ImGui/ImGui/imstb_truetype.h similarity index 100% rename from Example_ImGui/ImGui/imstb_truetype.h rename to Samples/Example_ImGui/ImGui/imstb_truetype.h diff --git a/Example_ImGui/ImGuiPS.hlsl b/Samples/Example_ImGui/ImGuiPS.hlsl similarity index 100% rename from Example_ImGui/ImGuiPS.hlsl rename to Samples/Example_ImGui/ImGuiPS.hlsl diff --git a/Example_ImGui/ImGuiVS.hlsl b/Samples/Example_ImGui/ImGuiVS.hlsl similarity index 100% rename from Example_ImGui/ImGuiVS.hlsl rename to Samples/Example_ImGui/ImGuiVS.hlsl diff --git a/Example_ImGui/Tests.rc b/Samples/Example_ImGui/Tests.rc similarity index 100% rename from Example_ImGui/Tests.rc rename to Samples/Example_ImGui/Tests.rc diff --git a/Example_ImGui/font_test.txt b/Samples/Example_ImGui/font_test.txt similarity index 100% rename from Example_ImGui/font_test.txt rename to Samples/Example_ImGui/font_test.txt diff --git a/Samples/Example_ImGui/imgui.ini b/Samples/Example_ImGui/imgui.ini new file mode 100644 index 000000000..f834eefda --- /dev/null +++ b/Samples/Example_ImGui/imgui.ini @@ -0,0 +1,15 @@ +[Window][Debug##Default] +Pos=60,60 +Size=400,400 +Collapsed=0 + +[Window][Dear ImGui Demo] +Pos=330,358 +Size=550,680 +Collapsed=0 + +[Window][Hello, world!] +Pos=1077,133 +Size=353,180 +Collapsed=0 + diff --git a/Example_ImGui/main_SDL2.cpp b/Samples/Example_ImGui/main_SDL2.cpp similarity index 100% rename from Example_ImGui/main_SDL2.cpp rename to Samples/Example_ImGui/main_SDL2.cpp diff --git a/Example_ImGui/main_Windows.cpp b/Samples/Example_ImGui/main_Windows.cpp similarity index 100% rename from Example_ImGui/main_Windows.cpp rename to Samples/Example_ImGui/main_Windows.cpp diff --git a/Example_ImGui/main_Windows.h b/Samples/Example_ImGui/main_Windows.h similarity index 100% rename from Example_ImGui/main_Windows.h rename to Samples/Example_ImGui/main_Windows.h diff --git a/Example_ImGui/resource.h b/Samples/Example_ImGui/resource.h similarity index 100% rename from Example_ImGui/resource.h rename to Samples/Example_ImGui/resource.h diff --git a/Example_ImGui/stdafx.cpp b/Samples/Example_ImGui/stdafx.cpp similarity index 100% rename from Example_ImGui/stdafx.cpp rename to Samples/Example_ImGui/stdafx.cpp diff --git a/Example_ImGui/stdafx.h b/Samples/Example_ImGui/stdafx.h similarity index 100% rename from Example_ImGui/stdafx.h rename to Samples/Example_ImGui/stdafx.h diff --git a/Example_ImGui/targetver.h b/Samples/Example_ImGui/targetver.h similarity index 100% rename from Example_ImGui/targetver.h rename to Samples/Example_ImGui/targetver.h diff --git a/Example_ImGui/wicked.ico b/Samples/Example_ImGui/wicked.ico similarity index 100% rename from Example_ImGui/wicked.ico rename to Samples/Example_ImGui/wicked.ico diff --git a/Example_ImGui_Docking/CMakeLists.txt b/Samples/Example_ImGui_Docking/CMakeLists.txt similarity index 98% rename from Example_ImGui_Docking/CMakeLists.txt rename to Samples/Example_ImGui_Docking/CMakeLists.txt index 4d3f13d82..db4bb3277 100644 --- a/Example_ImGui_Docking/CMakeLists.txt +++ b/Samples/Example_ImGui_Docking/CMakeLists.txt @@ -21,7 +21,7 @@ set (SOURCE_FILES ImGui/ImGuizmo.cpp ImGui/ImGuizmo.h ImGui/IconsMaterialDesign.h - ../Editor/ModelImporter_GLTF.cpp + ../../Editor/ModelImporter_GLTF.cpp ) if (WIN32) diff --git a/Example_ImGui_Docking/Example_ImGui.vcxproj.filters b/Samples/Example_ImGui_Docking/Example_ImGui.vcxproj.filters similarity index 100% rename from Example_ImGui_Docking/Example_ImGui.vcxproj.filters rename to Samples/Example_ImGui_Docking/Example_ImGui.vcxproj.filters diff --git a/Example_ImGui_Docking/Example_ImGui_Docking.cpp b/Samples/Example_ImGui_Docking/Example_ImGui_Docking.cpp similarity index 99% rename from Example_ImGui_Docking/Example_ImGui_Docking.cpp rename to Samples/Example_ImGui_Docking/Example_ImGui_Docking.cpp index f203ca7e0..f4a1de0c4 100644 --- a/Example_ImGui_Docking/Example_ImGui_Docking.cpp +++ b/Samples/Example_ImGui_Docking/Example_ImGui_Docking.cpp @@ -32,6 +32,8 @@ #include #include +#define CONTENT_DIR "../../Content/" + using namespace wi::ecs; using namespace wi::scene; using namespace wi::graphics; @@ -390,7 +392,7 @@ void Example_ImGuiRenderer::Load() wi::scene::GetCamera().TransformCamera(transform); // Load model. - wi::scene::LoadModel("../Content/models/bloom_test.wiscene"); + wi::scene::LoadModel(CONTENT_DIR "models/bloom_test.wiscene"); RenderPath3D::Load(); @@ -631,14 +633,14 @@ void Example_ImGuiRenderer::Update(float dt) }; const char* wiscene_file_items[] = { - "../Content/models/bloom_test.wiscene", - "../Content/models/playground.wiscene", - "../Content/models/volumetric_test.wiscene", - "../Content/models/emitter_skinned.wiscene", - "../Content/models/physics_test.wiscene", - "../Content/models/shadows_test.wiscene", - "../Content/models/sponza/sponza.wiscene", - "../Content/models/emitter_fire.wiscene" + CONTENT_DIR "models/bloom_test.wiscene", + CONTENT_DIR "models/playground.wiscene", + CONTENT_DIR "models/volumetric_test.wiscene", + CONTENT_DIR "models/emitter_skinned.wiscene", + CONTENT_DIR "models/physics_test.wiscene", + CONTENT_DIR "models/shadows_test.wiscene", + CONTENT_DIR "models/sponza/sponza.wiscene", + CONTENT_DIR "models/emitter_fire.wiscene" }; if (ImGui::CollapsingHeader(ICON_MD_PLAY_CIRCLE_OUTLINE" Scene Demo", ImGuiTreeNodeFlags_DefaultOpen)) //ImGuiTreeNodeFlags_None diff --git a/Example_ImGui_Docking/Example_ImGui_Docking.h b/Samples/Example_ImGui_Docking/Example_ImGui_Docking.h similarity index 100% rename from Example_ImGui_Docking/Example_ImGui_Docking.h rename to Samples/Example_ImGui_Docking/Example_ImGui_Docking.h diff --git a/Example_ImGui_Docking/Example_ImGui_Docking.vcxproj b/Samples/Example_ImGui_Docking/Example_ImGui_Docking.vcxproj similarity index 95% rename from Example_ImGui_Docking/Example_ImGui_Docking.vcxproj rename to Samples/Example_ImGui_Docking/Example_ImGui_Docking.vcxproj index 68f5c6355..11406cbcc 100644 --- a/Example_ImGui_Docking/Example_ImGui_Docking.vcxproj +++ b/Samples/Example_ImGui_Docking/Example_ImGui_Docking.vcxproj @@ -119,8 +119,9 @@ - - + + + @@ -138,23 +139,6 @@ - - - {06163dcb-b183-4ed9-9c62-13ef1658e049} - - - - - true - Document - true - - - true - Document - true - - Document @@ -166,6 +150,23 @@ + + + true + true + Document + + + true + true + Document + + + + + {06163dcb-b183-4ed9-9c62-13ef1658e049} + + diff --git a/Example_ImGui_Docking/Example_ImGui_Docking.vcxproj.filters b/Samples/Example_ImGui_Docking/Example_ImGui_Docking.vcxproj.filters similarity index 88% rename from Example_ImGui_Docking/Example_ImGui_Docking.vcxproj.filters rename to Samples/Example_ImGui_Docking/Example_ImGui_Docking.vcxproj.filters index 0fa3bc936..af5300c40 100644 --- a/Example_ImGui_Docking/Example_ImGui_Docking.vcxproj.filters +++ b/Samples/Example_ImGui_Docking/Example_ImGui_Docking.vcxproj.filters @@ -25,18 +25,21 @@ Code - - Code - - - Code - Code ImGui + + Code + + + Code + + + Code + @@ -77,17 +80,14 @@ - - Resources - - + @@ -105,4 +105,7 @@ Resources + + + \ No newline at end of file diff --git a/Example_ImGui_Docking/ImGui/IconsMaterialDesign.h b/Samples/Example_ImGui_Docking/ImGui/IconsMaterialDesign.h similarity index 100% rename from Example_ImGui_Docking/ImGui/IconsMaterialDesign.h rename to Samples/Example_ImGui_Docking/ImGui/IconsMaterialDesign.h diff --git a/Example_ImGui_Docking/ImGui/ImGuizmo.cpp b/Samples/Example_ImGui_Docking/ImGui/ImGuizmo.cpp similarity index 100% rename from Example_ImGui_Docking/ImGui/ImGuizmo.cpp rename to Samples/Example_ImGui_Docking/ImGui/ImGuizmo.cpp diff --git a/Example_ImGui_Docking/ImGui/ImGuizmo.h b/Samples/Example_ImGui_Docking/ImGui/ImGuizmo.h similarity index 100% rename from Example_ImGui_Docking/ImGui/ImGuizmo.h rename to Samples/Example_ImGui_Docking/ImGui/ImGuizmo.h diff --git a/Example_ImGui_Docking/ImGui/LICENSE.txt b/Samples/Example_ImGui_Docking/ImGui/LICENSE.txt similarity index 100% rename from Example_ImGui_Docking/ImGui/LICENSE.txt rename to Samples/Example_ImGui_Docking/ImGui/LICENSE.txt diff --git a/Example_ImGui_Docking/ImGui/imconfig.h b/Samples/Example_ImGui_Docking/ImGui/imconfig.h similarity index 100% rename from Example_ImGui_Docking/ImGui/imconfig.h rename to Samples/Example_ImGui_Docking/ImGui/imconfig.h diff --git a/Example_ImGui_Docking/ImGui/imgui.cpp b/Samples/Example_ImGui_Docking/ImGui/imgui.cpp similarity index 100% rename from Example_ImGui_Docking/ImGui/imgui.cpp rename to Samples/Example_ImGui_Docking/ImGui/imgui.cpp diff --git a/Example_ImGui_Docking/ImGui/imgui.h b/Samples/Example_ImGui_Docking/ImGui/imgui.h similarity index 100% rename from Example_ImGui_Docking/ImGui/imgui.h rename to Samples/Example_ImGui_Docking/ImGui/imgui.h diff --git a/Example_ImGui_Docking/ImGui/imgui_demo.cpp b/Samples/Example_ImGui_Docking/ImGui/imgui_demo.cpp similarity index 100% rename from Example_ImGui_Docking/ImGui/imgui_demo.cpp rename to Samples/Example_ImGui_Docking/ImGui/imgui_demo.cpp diff --git a/Example_ImGui_Docking/ImGui/imgui_draw.cpp b/Samples/Example_ImGui_Docking/ImGui/imgui_draw.cpp similarity index 100% rename from Example_ImGui_Docking/ImGui/imgui_draw.cpp rename to Samples/Example_ImGui_Docking/ImGui/imgui_draw.cpp diff --git a/Example_ImGui_Docking/ImGui/imgui_impl_sdl.cpp b/Samples/Example_ImGui_Docking/ImGui/imgui_impl_sdl.cpp similarity index 100% rename from Example_ImGui_Docking/ImGui/imgui_impl_sdl.cpp rename to Samples/Example_ImGui_Docking/ImGui/imgui_impl_sdl.cpp diff --git a/Example_ImGui_Docking/ImGui/imgui_impl_sdl.h b/Samples/Example_ImGui_Docking/ImGui/imgui_impl_sdl.h similarity index 100% rename from Example_ImGui_Docking/ImGui/imgui_impl_sdl.h rename to Samples/Example_ImGui_Docking/ImGui/imgui_impl_sdl.h diff --git a/Example_ImGui_Docking/ImGui/imgui_impl_win32.cpp b/Samples/Example_ImGui_Docking/ImGui/imgui_impl_win32.cpp similarity index 100% rename from Example_ImGui_Docking/ImGui/imgui_impl_win32.cpp rename to Samples/Example_ImGui_Docking/ImGui/imgui_impl_win32.cpp diff --git a/Example_ImGui_Docking/ImGui/imgui_impl_win32.h b/Samples/Example_ImGui_Docking/ImGui/imgui_impl_win32.h similarity index 100% rename from Example_ImGui_Docking/ImGui/imgui_impl_win32.h rename to Samples/Example_ImGui_Docking/ImGui/imgui_impl_win32.h diff --git a/Example_ImGui_Docking/ImGui/imgui_internal.h b/Samples/Example_ImGui_Docking/ImGui/imgui_internal.h similarity index 100% rename from Example_ImGui_Docking/ImGui/imgui_internal.h rename to Samples/Example_ImGui_Docking/ImGui/imgui_internal.h diff --git a/Example_ImGui_Docking/ImGui/imgui_tables.cpp b/Samples/Example_ImGui_Docking/ImGui/imgui_tables.cpp similarity index 100% rename from Example_ImGui_Docking/ImGui/imgui_tables.cpp rename to Samples/Example_ImGui_Docking/ImGui/imgui_tables.cpp diff --git a/Example_ImGui_Docking/ImGui/imgui_widgets.cpp b/Samples/Example_ImGui_Docking/ImGui/imgui_widgets.cpp similarity index 100% rename from Example_ImGui_Docking/ImGui/imgui_widgets.cpp rename to Samples/Example_ImGui_Docking/ImGui/imgui_widgets.cpp diff --git a/Example_ImGui_Docking/ImGui/imstb_rectpack.h b/Samples/Example_ImGui_Docking/ImGui/imstb_rectpack.h similarity index 100% rename from Example_ImGui_Docking/ImGui/imstb_rectpack.h rename to Samples/Example_ImGui_Docking/ImGui/imstb_rectpack.h diff --git a/Example_ImGui_Docking/ImGui/imstb_textedit.h b/Samples/Example_ImGui_Docking/ImGui/imstb_textedit.h similarity index 100% rename from Example_ImGui_Docking/ImGui/imstb_textedit.h rename to Samples/Example_ImGui_Docking/ImGui/imstb_textedit.h diff --git a/Example_ImGui_Docking/ImGui/imstb_truetype.h b/Samples/Example_ImGui_Docking/ImGui/imstb_truetype.h similarity index 100% rename from Example_ImGui_Docking/ImGui/imstb_truetype.h rename to Samples/Example_ImGui_Docking/ImGui/imstb_truetype.h diff --git a/Example_ImGui_Docking/ImGuiPS.hlsl b/Samples/Example_ImGui_Docking/ImGuiPS.hlsl similarity index 100% rename from Example_ImGui_Docking/ImGuiPS.hlsl rename to Samples/Example_ImGui_Docking/ImGuiPS.hlsl diff --git a/Example_ImGui_Docking/ImGuiVS.hlsl b/Samples/Example_ImGui_Docking/ImGuiVS.hlsl similarity index 100% rename from Example_ImGui_Docking/ImGuiVS.hlsl rename to Samples/Example_ImGui_Docking/ImGuiVS.hlsl diff --git a/Example_ImGui_Docking/MaterialIcons-Regular.ttf b/Samples/Example_ImGui_Docking/MaterialIcons-Regular.ttf similarity index 100% rename from Example_ImGui_Docking/MaterialIcons-Regular.ttf rename to Samples/Example_ImGui_Docking/MaterialIcons-Regular.ttf diff --git a/Example_ImGui_Docking/Roboto-Medium.ttf b/Samples/Example_ImGui_Docking/Roboto-Medium.ttf similarity index 100% rename from Example_ImGui_Docking/Roboto-Medium.ttf rename to Samples/Example_ImGui_Docking/Roboto-Medium.ttf diff --git a/Example_ImGui_Docking/Tests.rc b/Samples/Example_ImGui_Docking/Tests.rc similarity index 100% rename from Example_ImGui_Docking/Tests.rc rename to Samples/Example_ImGui_Docking/Tests.rc diff --git a/Example_ImGui_Docking/font_test.txt b/Samples/Example_ImGui_Docking/font_test.txt similarity index 100% rename from Example_ImGui_Docking/font_test.txt rename to Samples/Example_ImGui_Docking/font_test.txt diff --git a/Example_ImGui_Docking/imgui.ini b/Samples/Example_ImGui_Docking/imgui.ini similarity index 71% rename from Example_ImGui_Docking/imgui.ini rename to Samples/Example_ImGui_Docking/imgui.ini index d91bcecc5..2526ad003 100644 --- a/Example_ImGui_Docking/imgui.ini +++ b/Samples/Example_ImGui_Docking/imgui.ini @@ -84,7 +84,7 @@ Collapsed=0 [Window][DockSpaceWicked] Pos=0,0 -Size=1920,1017 +Size=3303,1906 Collapsed=0 [Window][##Info] @@ -114,7 +114,7 @@ Collapsed=0 [Window][Scene] Pos=0,0 -Size=270,1017 +Size=540,1906 Collapsed=0 DockId=0x00000003,0 @@ -124,29 +124,29 @@ Size=1080,197 Collapsed=0 [Window][Options] -Pos=1623,0 -Size=297,1017 +Pos=2708,0 +Size=595,1906 Collapsed=0 DockId=0x00000002,0 [Window][ Wicked Backlog] -Pos=272,820 -Size=1349,197 +Pos=542,1509 +Size=2164,397 Collapsed=0 DockId=0x00000006,1 [Window][ Debugger] -Pos=272,820 -Size=1349,197 +Pos=542,1509 +Size=2164,397 Collapsed=0 DockId=0x00000006,0 [Docking][Data] -DockSpace ID=0x2680D444 Window=0xC6EE5C0C Pos=0,0 Size=1920,1017 Split=X - DockNode ID=0x00000001 Parent=0x2680D444 SizeRef=1352,949 Split=X - DockNode ID=0x00000003 Parent=0x00000001 SizeRef=270,949 Selected=0xE192E354 - DockNode ID=0x00000004 Parent=0x00000001 SizeRef=1080,949 Split=Y - DockNode ID=0x00000005 Parent=0x00000004 SizeRef=1080,750 CentralNode=1 NoTabBar=1 - DockNode ID=0x00000006 Parent=0x00000004 SizeRef=1080,197 Selected=0x825AC050 - DockNode ID=0x00000002 Parent=0x2680D444 SizeRef=297,949 Selected=0xE365E069 +DockSpace ID=0x2680D444 Window=0xC6EE5C0C Pos=0,0 Size=3303,1906 Split=X + DockNode ID=0x00000001 Parent=0x2680D444 SizeRef=2706,1906 Split=X + DockNode ID=0x00000003 Parent=0x00000001 SizeRef=540,1906 Selected=0xE192E354 + DockNode ID=0x00000004 Parent=0x00000001 SizeRef=2164,1906 Split=Y + DockNode ID=0x00000005 Parent=0x00000004 SizeRef=2164,1507 CentralNode=1 NoTabBar=1 + DockNode ID=0x00000006 Parent=0x00000004 SizeRef=2164,397 Selected=0xB0D26A45 + DockNode ID=0x00000002 Parent=0x2680D444 SizeRef=595,1906 Selected=0xE365E069 diff --git a/Example_ImGui_Docking/main_SDL2.cpp b/Samples/Example_ImGui_Docking/main_SDL2.cpp similarity index 100% rename from Example_ImGui_Docking/main_SDL2.cpp rename to Samples/Example_ImGui_Docking/main_SDL2.cpp diff --git a/Example_ImGui_Docking/main_Windows.cpp b/Samples/Example_ImGui_Docking/main_Windows.cpp similarity index 100% rename from Example_ImGui_Docking/main_Windows.cpp rename to Samples/Example_ImGui_Docking/main_Windows.cpp diff --git a/Example_ImGui_Docking/main_Windows.h b/Samples/Example_ImGui_Docking/main_Windows.h similarity index 100% rename from Example_ImGui_Docking/main_Windows.h rename to Samples/Example_ImGui_Docking/main_Windows.h diff --git a/Example_ImGui_Docking/resource.h b/Samples/Example_ImGui_Docking/resource.h similarity index 100% rename from Example_ImGui_Docking/resource.h rename to Samples/Example_ImGui_Docking/resource.h diff --git a/Example_ImGui_Docking/stdafx.cpp b/Samples/Example_ImGui_Docking/stdafx.cpp similarity index 100% rename from Example_ImGui_Docking/stdafx.cpp rename to Samples/Example_ImGui_Docking/stdafx.cpp diff --git a/Example_ImGui_Docking/stdafx.h b/Samples/Example_ImGui_Docking/stdafx.h similarity index 100% rename from Example_ImGui_Docking/stdafx.h rename to Samples/Example_ImGui_Docking/stdafx.h diff --git a/Example_ImGui_Docking/targetver.h b/Samples/Example_ImGui_Docking/targetver.h similarity index 100% rename from Example_ImGui_Docking/targetver.h rename to Samples/Example_ImGui_Docking/targetver.h diff --git a/Example_ImGui_Docking/wicked.ico b/Samples/Example_ImGui_Docking/wicked.ico similarity index 100% rename from Example_ImGui_Docking/wicked.ico rename to Samples/Example_ImGui_Docking/wicked.ico diff --git a/Template_Linux/CMakeLists.txt b/Samples/Template_Linux/CMakeLists.txt similarity index 100% rename from Template_Linux/CMakeLists.txt rename to Samples/Template_Linux/CMakeLists.txt diff --git a/Template_Linux/ReadMe.txt b/Samples/Template_Linux/ReadMe.txt similarity index 100% rename from Template_Linux/ReadMe.txt rename to Samples/Template_Linux/ReadMe.txt diff --git a/Template_Linux/main.cpp b/Samples/Template_Linux/main.cpp similarity index 100% rename from Template_Linux/main.cpp rename to Samples/Template_Linux/main.cpp diff --git a/Template_Linux/stdafx.h b/Samples/Template_Linux/stdafx.h similarity index 100% rename from Template_Linux/stdafx.h rename to Samples/Template_Linux/stdafx.h diff --git a/Template_Windows/CMakeLists.txt b/Samples/Template_Windows/CMakeLists.txt similarity index 100% rename from Template_Windows/CMakeLists.txt rename to Samples/Template_Windows/CMakeLists.txt diff --git a/Template_Windows/ReadMe.txt b/Samples/Template_Windows/ReadMe.txt similarity index 100% rename from Template_Windows/ReadMe.txt rename to Samples/Template_Windows/ReadMe.txt diff --git a/Template_Windows/TemplateWindows.rc b/Samples/Template_Windows/TemplateWindows.rc similarity index 100% rename from Template_Windows/TemplateWindows.rc rename to Samples/Template_Windows/TemplateWindows.rc diff --git a/Template_Windows/Template_Windows.vcxproj b/Samples/Template_Windows/Template_Windows.vcxproj similarity index 90% rename from Template_Windows/Template_Windows.vcxproj rename to Samples/Template_Windows/Template_Windows.vcxproj index b03e1aaf4..ede918ca7 100644 --- a/Template_Windows/Template_Windows.vcxproj +++ b/Samples/Template_Windows/Template_Windows.vcxproj @@ -121,21 +121,25 @@ - + + + + + true + true + Document + + + true + true + Document + + + + {06163dcb-b183-4ed9-9c62-13ef1658e049} - - - Document - - - Document - - - - - diff --git a/Template_Windows/Template_Windows.vcxproj.filters b/Samples/Template_Windows/Template_Windows.vcxproj.filters similarity index 89% rename from Template_Windows/Template_Windows.vcxproj.filters rename to Samples/Template_Windows/Template_Windows.vcxproj.filters index 903f4df71..0873a3c12 100644 --- a/Template_Windows/Template_Windows.vcxproj.filters +++ b/Samples/Template_Windows/Template_Windows.vcxproj.filters @@ -39,13 +39,15 @@ Resource Files - - - - Resource Files + + + + + + \ No newline at end of file diff --git a/Template_Windows/main.cpp b/Samples/Template_Windows/main.cpp similarity index 100% rename from Template_Windows/main.cpp rename to Samples/Template_Windows/main.cpp diff --git a/Template_Windows/main.h b/Samples/Template_Windows/main.h similarity index 100% rename from Template_Windows/main.h rename to Samples/Template_Windows/main.h diff --git a/Template_Windows/resource.h b/Samples/Template_Windows/resource.h similarity index 100% rename from Template_Windows/resource.h rename to Samples/Template_Windows/resource.h diff --git a/Template_Windows/stdafx.cpp b/Samples/Template_Windows/stdafx.cpp similarity index 100% rename from Template_Windows/stdafx.cpp rename to Samples/Template_Windows/stdafx.cpp diff --git a/Template_Windows/stdafx.h b/Samples/Template_Windows/stdafx.h similarity index 100% rename from Template_Windows/stdafx.h rename to Samples/Template_Windows/stdafx.h diff --git a/Template_Windows/targetver.h b/Samples/Template_Windows/targetver.h similarity index 100% rename from Template_Windows/targetver.h rename to Samples/Template_Windows/targetver.h diff --git a/Template_Windows/wicked.ico b/Samples/Template_Windows/wicked.ico similarity index 100% rename from Template_Windows/wicked.ico rename to Samples/Template_Windows/wicked.ico diff --git a/Tests/CMakeLists.txt b/Samples/Tests/CMakeLists.txt similarity index 100% rename from Tests/CMakeLists.txt rename to Samples/Tests/CMakeLists.txt diff --git a/Tests/Tests.cpp b/Samples/Tests/Tests.cpp similarity index 96% rename from Tests/Tests.cpp rename to Samples/Tests/Tests.cpp index 40f13d123..c3e89528d 100644 --- a/Tests/Tests.cpp +++ b/Samples/Tests/Tests.cpp @@ -1,5 +1,7 @@ #include "stdafx.h" +#define CONTENT_DIR "../../Content/" + using namespace wi::ecs; using namespace wi::scene; @@ -91,7 +93,7 @@ void TestsRenderer::Load() if (!sound.IsValid()) { - wi::audio::CreateSound("../Content/models/water.wav", &sound); + wi::audio::CreateSound(CONTENT_DIR "models/water.wav", &sound); wi::audio::CreateSoundInstance(&sound, &soundinstance); wi::audio::SetVolume(volume.GetValue() / 100.0f, &soundinstance); } @@ -204,16 +206,16 @@ void TestsRenderer::Load() } case MODEL: wi::renderer::SetTemporalAAEnabled(true); - wi::scene::LoadModel("../Content/models/teapot.wiscene"); + wi::scene::LoadModel(CONTENT_DIR "models/teapot.wiscene"); break; case EMITTEDPARTICLE1: - wi::scene::LoadModel("../Content/models/emitter_smoke.wiscene"); + wi::scene::LoadModel(CONTENT_DIR "models/emitter_smoke.wiscene"); break; case EMITTEDPARTICLE2: - wi::scene::LoadModel("../Content/models/emitter_skinned.wiscene"); + wi::scene::LoadModel(CONTENT_DIR "models/emitter_skinned.wiscene"); break; case HAIRPARTICLE: - wi::scene::LoadModel("../Content/models/hairparticle_torus.wiscene", XMMatrixTranslation(0, 1, 0)); + wi::scene::LoadModel(CONTENT_DIR "models/hairparticle_torus.wiscene", XMMatrixTranslation(0, 1, 0)); break; case LUASCRIPT: wi::renderer::SetToDrawGridHelper(true); @@ -221,18 +223,18 @@ void TestsRenderer::Load() break; case WATERTEST: wi::renderer::SetTemporalAAEnabled(true); - wi::scene::LoadModel("../Content/models/water_test.wiscene", XMMatrixTranslation(0, 1, 0)); + wi::scene::LoadModel(CONTENT_DIR "models/water_test.wiscene", XMMatrixTranslation(0, 1, 0)); break; case SHADOWSTEST: wi::renderer::SetTemporalAAEnabled(true); - wi::scene::LoadModel("../Content/models/shadows_test.wiscene", XMMatrixTranslation(0, 1, 0)); + wi::scene::LoadModel(CONTENT_DIR "models/shadows_test.wiscene", XMMatrixTranslation(0, 1, 0)); break; case PHYSICSTEST: wi::renderer::SetTemporalAAEnabled(true); - wi::scene::LoadModel("../Content/models/physics_test.wiscene"); + wi::scene::LoadModel(CONTENT_DIR "models/physics_test.wiscene"); break; case CLOTHPHYSICSTEST: - wi::scene::LoadModel("../Content/models/cloth_test.wiscene", XMMatrixTranslation(0, 3, 4)); + wi::scene::LoadModel(CONTENT_DIR "models/cloth_test.wiscene", XMMatrixTranslation(0, 3, 4)); break; case JOBSYSTEMTEST: RunJobSystemTest(); @@ -242,7 +244,7 @@ void TestsRenderer::Load() break; case VOLUMETRICTEST: wi::renderer::SetTemporalAAEnabled(true); - wi::scene::LoadModel("../Content/models/volumetric_test.wiscene", XMMatrixTranslation(0, 0, 4)); + wi::scene::LoadModel(CONTENT_DIR "models/volumetric_test.wiscene", XMMatrixTranslation(0, 0, 4)); break; case SPRITETEST: RunSpriteTest(); @@ -250,7 +252,7 @@ void TestsRenderer::Load() case LIGHTMAPBAKETEST: wi::eventhandler::SetVSync(false); // turn off vsync if we can to accelerate the baking wi::renderer::SetTemporalAAEnabled(true); - wi::scene::LoadModel("../Content/models/lightmap_bake_test.wiscene", XMMatrixTranslation(0, 0, 4)); + wi::scene::LoadModel(CONTENT_DIR "models/lightmap_bake_test.wiscene", XMMatrixTranslation(0, 0, 4)); break; case NETWORKTEST: RunNetworkTest(); @@ -353,7 +355,7 @@ void TestsRenderer::Load() case INVERSEKINEMATICSTEST: { Scene scene; - LoadModel(scene, "../Content/scripts/character_controller/assets/character.wiscene", XMMatrixScaling(2, 2, 2)); + LoadModel(scene, CONTENT_DIR "scripts/character_controller/assets/character.wiscene", XMMatrixScaling(2, 2, 2)); if (scene.humanoids.GetCount() == 0) break; @@ -389,7 +391,7 @@ void TestsRenderer::Load() case INSTANCESTEST: { - wi::scene::LoadModel("../Content/models/cube.wiscene"); + wi::scene::LoadModel(CONTENT_DIR "models/cube.wiscene"); wi::profiler::SetEnabled(true); Scene& scene = wi::scene::GetScene(); scene.Entity_CreateLight("testlight", XMFLOAT3(0, 2, -4), XMFLOAT3(1, 1, 1), 4, 10); @@ -796,7 +798,7 @@ void TestsRenderer::RunSpriteTest() // Simple sprite, no animation: { - static wi::Sprite sprite("../Content/logo_small.png"); + static wi::Sprite sprite(CONTENT_DIR "logo_small.png"); sprite.params = params; AddSprite(&sprite); @@ -812,7 +814,7 @@ void TestsRenderer::RunSpriteTest() // Simple sprite, fade animation: { - static wi::Sprite sprite("../Content/logo_small.png"); + static wi::Sprite sprite(CONTENT_DIR "logo_small.png"); sprite.params = params; sprite.anim = wi::Sprite::Anim(); sprite.anim.fad = 1.2f; // (you can also do opacity animation with sprite.anim.opa) @@ -831,7 +833,7 @@ void TestsRenderer::RunSpriteTest() // Simple sprite, wobble animation: { - static wi::Sprite sprite("../Content/logo_small.png"); + static wi::Sprite sprite(CONTENT_DIR "logo_small.png"); sprite.params = params; sprite.anim = wi::Sprite::Anim(); sprite.anim.wobbleAnim.amount = XMFLOAT2(0.11f, 0.18f); @@ -850,7 +852,7 @@ void TestsRenderer::RunSpriteTest() // Simple sprite, rotate animation: { - static wi::Sprite sprite("../Content/logo_small.png"); + static wi::Sprite sprite(CONTENT_DIR "logo_small.png"); sprite.params = params; sprite.anim = wi::Sprite::Anim(); sprite.anim.rot = 2.8f; @@ -869,7 +871,7 @@ void TestsRenderer::RunSpriteTest() // Simple sprite, movingtex: { - static wi::Sprite sprite("images/movingtex.png", "../Content/logo_small.png"); // first param is the texture we will display (and also scroll here). Second param is a mask texture + static wi::Sprite sprite("images/movingtex.png", CONTENT_DIR "logo_small.png"); // first param is the texture we will display (and also scroll here). Second param is a mask texture // Don't overwrite all params for this, because we want to keep the mask... sprite.params.pos = params.pos; sprite.params.siz = params.siz; diff --git a/Tests/Tests.h b/Samples/Tests/Tests.h similarity index 100% rename from Tests/Tests.h rename to Samples/Tests/Tests.h diff --git a/Tests/Tests.rc b/Samples/Tests/Tests.rc similarity index 100% rename from Tests/Tests.rc rename to Samples/Tests/Tests.rc diff --git a/Tests/Tests.vcxproj b/Samples/Tests/Tests.vcxproj similarity index 91% rename from Tests/Tests.vcxproj rename to Samples/Tests/Tests.vcxproj index ab232b5b4..e12bfeb5f 100644 --- a/Tests/Tests.vcxproj +++ b/Samples/Tests/Tests.vcxproj @@ -128,15 +128,14 @@ - - {06163dcb-b183-4ed9-9c62-13ef1658e049} - - - - + + true + true Document - + + true + true Document @@ -144,9 +143,9 @@ - - true - + + {06163dcb-b183-4ed9-9c62-13ef1658e049} + diff --git a/Tests/Tests.vcxproj.filters b/Samples/Tests/Tests.vcxproj.filters similarity index 82% rename from Tests/Tests.vcxproj.filters rename to Samples/Tests/Tests.vcxproj.filters index 6a4ab94ae..d4679b8b5 100644 --- a/Tests/Tests.vcxproj.filters +++ b/Samples/Tests/Tests.vcxproj.filters @@ -11,9 +11,6 @@ {115a0548-191e-4f7c-bd01-95f6c7de7afe} - - {2300de17-ec3d-4e75-b143-e18829ba9361} - @@ -53,6 +50,7 @@ + @@ -60,12 +58,6 @@ - - sound - - - - - + \ No newline at end of file diff --git a/Tests/images/HelloWorld.png b/Samples/Tests/images/HelloWorld.png similarity index 100% rename from Tests/images/HelloWorld.png rename to Samples/Tests/images/HelloWorld.png diff --git a/Tests/images/earth_001.png b/Samples/Tests/images/earth_001.png similarity index 100% rename from Tests/images/earth_001.png rename to Samples/Tests/images/earth_001.png diff --git a/Tests/images/fire_001.png b/Samples/Tests/images/fire_001.png similarity index 100% rename from Tests/images/fire_001.png rename to Samples/Tests/images/fire_001.png diff --git a/Tests/images/movingtex.png b/Samples/Tests/images/movingtex.png similarity index 100% rename from Tests/images/movingtex.png rename to Samples/Tests/images/movingtex.png diff --git a/Tests/images/special_001.png b/Samples/Tests/images/special_001.png similarity index 100% rename from Tests/images/special_001.png rename to Samples/Tests/images/special_001.png diff --git a/Tests/images/spritesheet_grid.png b/Samples/Tests/images/spritesheet_grid.png similarity index 100% rename from Tests/images/spritesheet_grid.png rename to Samples/Tests/images/spritesheet_grid.png diff --git a/Tests/images/water_003.png b/Samples/Tests/images/water_003.png similarity index 100% rename from Tests/images/water_003.png rename to Samples/Tests/images/water_003.png diff --git a/Tests/images/wind_002.png b/Samples/Tests/images/wind_002.png similarity index 100% rename from Tests/images/wind_002.png rename to Samples/Tests/images/wind_002.png diff --git a/Tests/main_SDL2.cpp b/Samples/Tests/main_SDL2.cpp similarity index 100% rename from Tests/main_SDL2.cpp rename to Samples/Tests/main_SDL2.cpp diff --git a/Tests/main_Windows.cpp b/Samples/Tests/main_Windows.cpp similarity index 100% rename from Tests/main_Windows.cpp rename to Samples/Tests/main_Windows.cpp diff --git a/Tests/main_Windows.h b/Samples/Tests/main_Windows.h similarity index 100% rename from Tests/main_Windows.h rename to Samples/Tests/main_Windows.h diff --git a/Tests/resource.h b/Samples/Tests/resource.h similarity index 100% rename from Tests/resource.h rename to Samples/Tests/resource.h diff --git a/Tests/stdafx.cpp b/Samples/Tests/stdafx.cpp similarity index 100% rename from Tests/stdafx.cpp rename to Samples/Tests/stdafx.cpp diff --git a/Tests/stdafx.h b/Samples/Tests/stdafx.h similarity index 100% rename from Tests/stdafx.h rename to Samples/Tests/stdafx.h diff --git a/Tests/targetver.h b/Samples/Tests/targetver.h similarity index 100% rename from Tests/targetver.h rename to Samples/Tests/targetver.h diff --git a/Tests/test_script.lua b/Samples/Tests/test_script.lua similarity index 100% rename from Tests/test_script.lua rename to Samples/Tests/test_script.lua diff --git a/Tests/wicked.ico b/Samples/Tests/wicked.ico similarity index 100% rename from Tests/wicked.ico rename to Samples/Tests/wicked.ico diff --git a/Tests/yumin.ttf b/Samples/Tests/yumin.ttf similarity index 100% rename from Tests/yumin.ttf rename to Samples/Tests/yumin.ttf diff --git a/WickedEngine.sln b/WickedEngine.sln index 5a00fd080..907c1c870 100644 --- a/WickedEngine.sln +++ b/WickedEngine.sln @@ -7,10 +7,6 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Editor_Windows", "Editor\Ed EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Editor_SOURCE", "Editor\Editor_SOURCE.vcxitems", "{867FEBCA-09C4-4FE7-8A4C-4D9B1C27E7D0}" EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Tests", "Tests\Tests.vcxproj", "{3A9EA3D0-A795-46ED-A737-7164E90DC309}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Template_Windows", "Template_Windows\Template_Windows.vcxproj", "{76AA3D37-3252-4785-9334-3FC6B8CC07DE}" -EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "WickedEngine_SOURCE", "WickedEngine\WickedEngine_SOURCE.vcxitems", "{45D41ACC-2C3C-43D2-BC10-02AA73FFC7C7}" EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "WickedEngine_Windows", "WickedEngine\WickedEngine_Windows.vcxproj", "{06163DCB-B183-4ED9-9C62-13EF1658E049}" @@ -40,9 +36,13 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Content", "Content\Content. EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Samples", "Samples", "{F1ADB727-BCFC-4967-A8ED-BF943AAA5BF7}" EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Example_ImGui", "Example_ImGui\Example_ImGui.vcxproj", "{2B636202-EF12-43CF-8431-FA516F2E132C}" +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Template_Windows", "Samples\Template_Windows\Template_Windows.vcxproj", "{76AA3D37-3252-4785-9334-3FC6B8CC07DE}" EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Example_ImGui_Docking", "Example_ImGui_Docking\Example_ImGui_Docking.vcxproj", "{5646F9FB-C9E3-4DA4-8AAA-EB7A46DD777E}" +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Tests", "Samples\Tests\Tests.vcxproj", "{3A9EA3D0-A795-46ED-A737-7164E90DC309}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Example_ImGui", "Samples\Example_ImGui\Example_ImGui.vcxproj", "{2B636202-EF12-43CF-8431-FA516F2E132C}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Example_ImGui_Docking", "Samples\Example_ImGui_Docking\Example_ImGui_Docking.vcxproj", "{5646F9FB-C9E3-4DA4-8AAA-EB7A46DD777E}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution @@ -54,14 +54,6 @@ Global {5FE97B9B-A445-4EEA-A42D-9DE60B891D48}.Debug|x64.Build.0 = Debug|x64 {5FE97B9B-A445-4EEA-A42D-9DE60B891D48}.Release|x64.ActiveCfg = Release|x64 {5FE97B9B-A445-4EEA-A42D-9DE60B891D48}.Release|x64.Build.0 = Release|x64 - {3A9EA3D0-A795-46ED-A737-7164E90DC309}.Debug|x64.ActiveCfg = Debug|x64 - {3A9EA3D0-A795-46ED-A737-7164E90DC309}.Debug|x64.Build.0 = Debug|x64 - {3A9EA3D0-A795-46ED-A737-7164E90DC309}.Release|x64.ActiveCfg = Release|x64 - {3A9EA3D0-A795-46ED-A737-7164E90DC309}.Release|x64.Build.0 = Release|x64 - {76AA3D37-3252-4785-9334-3FC6B8CC07DE}.Debug|x64.ActiveCfg = Debug|x64 - {76AA3D37-3252-4785-9334-3FC6B8CC07DE}.Debug|x64.Build.0 = Debug|x64 - {76AA3D37-3252-4785-9334-3FC6B8CC07DE}.Release|x64.ActiveCfg = Release|x64 - {76AA3D37-3252-4785-9334-3FC6B8CC07DE}.Release|x64.Build.0 = Release|x64 {06163DCB-B183-4ED9-9C62-13EF1658E049}.Debug|x64.ActiveCfg = Debug|x64 {06163DCB-B183-4ED9-9C62-13EF1658E049}.Debug|x64.Build.0 = Debug|x64 {06163DCB-B183-4ED9-9C62-13EF1658E049}.Release|x64.ActiveCfg = Release|x64 @@ -70,6 +62,14 @@ Global {3B74A7FE-CED7-4723-8824-AC708A865B98}.Debug|x64.Build.0 = Debug|x64 {3B74A7FE-CED7-4723-8824-AC708A865B98}.Release|x64.ActiveCfg = Release|x64 {3B74A7FE-CED7-4723-8824-AC708A865B98}.Release|x64.Build.0 = Release|x64 + {76AA3D37-3252-4785-9334-3FC6B8CC07DE}.Debug|x64.ActiveCfg = Debug|x64 + {76AA3D37-3252-4785-9334-3FC6B8CC07DE}.Debug|x64.Build.0 = Debug|x64 + {76AA3D37-3252-4785-9334-3FC6B8CC07DE}.Release|x64.ActiveCfg = Release|x64 + {76AA3D37-3252-4785-9334-3FC6B8CC07DE}.Release|x64.Build.0 = Release|x64 + {3A9EA3D0-A795-46ED-A737-7164E90DC309}.Debug|x64.ActiveCfg = Debug|x64 + {3A9EA3D0-A795-46ED-A737-7164E90DC309}.Debug|x64.Build.0 = Debug|x64 + {3A9EA3D0-A795-46ED-A737-7164E90DC309}.Release|x64.ActiveCfg = Release|x64 + {3A9EA3D0-A795-46ED-A737-7164E90DC309}.Release|x64.Build.0 = Release|x64 {2B636202-EF12-43CF-8431-FA516F2E132C}.Debug|x64.ActiveCfg = Debug|x64 {2B636202-EF12-43CF-8431-FA516F2E132C}.Debug|x64.Build.0 = Debug|x64 {2B636202-EF12-43CF-8431-FA516F2E132C}.Release|x64.ActiveCfg = Release|x64 @@ -83,6 +83,8 @@ Global HideSolutionNode = FALSE EndGlobalSection GlobalSection(NestedProjects) = preSolution + {76AA3D37-3252-4785-9334-3FC6B8CC07DE} = {F1ADB727-BCFC-4967-A8ED-BF943AAA5BF7} + {3A9EA3D0-A795-46ED-A737-7164E90DC309} = {F1ADB727-BCFC-4967-A8ED-BF943AAA5BF7} {2B636202-EF12-43CF-8431-FA516F2E132C} = {F1ADB727-BCFC-4967-A8ED-BF943AAA5BF7} {5646F9FB-C9E3-4DA4-8AAA-EB7A46DD777E} = {F1ADB727-BCFC-4967-A8ED-BF943AAA5BF7} EndGlobalSection diff --git a/WickedEngine/shaders/ShaderInterop.h b/WickedEngine/shaders/ShaderInterop.h index d3d6e5062..9243206cc 100644 --- a/WickedEngine/shaders/ShaderInterop.h +++ b/WickedEngine/shaders/ShaderInterop.h @@ -3,6 +3,10 @@ #ifdef __cplusplus // not invoking shader compiler, but included in engine source +// Determine shader source path: +#include "../wiHelper.h" +static const std::string SHADER_INTEROP_PATH = wi::helper::GetCurrentPath() + "/" + wi::helper::GetDirectoryFromPath(wi::helper::GetPathRelative(wi::helper::GetCurrentPath(), std::string(__FILE__))); + // Application-side types: #include "../wiMath.h" diff --git a/WickedEngine/shaders/globals.hlsli b/WickedEngine/shaders/globals.hlsli index 713e6edcc..8ce47ad43 100644 --- a/WickedEngine/shaders/globals.hlsli +++ b/WickedEngine/shaders/globals.hlsli @@ -213,7 +213,7 @@ inline uint2 unpack_pixel(uint value) #ifndef __PSSL__ // These are static samplers, they don't need to be bound: -// They are also on slots that are not bindable as sampler bind slots must be in [0,15] range! +// They are also on slots that are not bindable as sampler bind slots must be in [0, DESCRIPTORBINDER_SAMPLER_COUNT] range! SamplerState sampler_linear_clamp : register(s100); SamplerState sampler_linear_wrap : register(s101); SamplerState sampler_linear_mirror : register(s102); diff --git a/WickedEngine/wiHelper.cpp b/WickedEngine/wiHelper.cpp index a023c4fb8..16579617e 100644 --- a/WickedEngine/wiHelper.cpp +++ b/WickedEngine/wiHelper.cpp @@ -959,7 +959,7 @@ namespace wi::helper #define ToNativeString(x) (x) #endif // _WIN32 - std::string GetPathRelative(const std::string& rootdir, std::string& path) + std::string GetPathRelative(const std::string& rootdir, const std::string& path) { std::string ret = path; MakePathRelative(rootdir, ret); diff --git a/WickedEngine/wiHelper.h b/WickedEngine/wiHelper.h index f2b5e6687..54297c91e 100644 --- a/WickedEngine/wiHelper.h +++ b/WickedEngine/wiHelper.h @@ -79,7 +79,7 @@ namespace wi::helper std::string RemoveExtension(const std::string& filename); - std::string GetPathRelative(const std::string& rootdir, std::string& path); + std::string GetPathRelative(const std::string& rootdir, const std::string& path); void MakePathRelative(const std::string& rootdir, std::string& path); diff --git a/WickedEngine/wiRenderer.cpp b/WickedEngine/wiRenderer.cpp index f59d8f68f..37472e0a8 100644 --- a/WickedEngine/wiRenderer.cpp +++ b/WickedEngine/wiRenderer.cpp @@ -80,7 +80,7 @@ std::string SHADERSOURCEPATH = "../WickedEngine/shaders/"; #else // Note: when NOT using Shader Dump, use absolute directory, to avoid the case when something (eg. file dialog) overrides working directory std::string SHADERPATH = wi::helper::GetCurrentPath() + "/shaders/"; -std::string SHADERSOURCEPATH = wi::helper::GetCurrentPath() + "/../WickedEngine/shaders/"; +std::string SHADERSOURCEPATH = SHADER_INTEROP_PATH; #endif // SHADERDUMP_ENABLED // define this to use raytracing pipeline for raytraced reflections: