From 412eab5dff95bee5fe93348dd9356a7b09928949 Mon Sep 17 00:00:00 2001 From: Martin Felis Date: Sat, 3 Feb 2018 17:41:07 +0100 Subject: [PATCH] Applied local modifications to bgfx --- .../bgfx/3rdparty/ocornut-imgui/imgui_user.h | 2 +- 3rdparty/bgfx/examples/common/imgui/imgui.cpp | 3 ++ 3rdparty/bgfx/local_modifications.diff | 46 +++++++++++++++++++ 3rdparty/bgfx/src/amalgamated.cpp | 4 +- 4 files changed, 52 insertions(+), 3 deletions(-) create mode 100644 3rdparty/bgfx/local_modifications.diff diff --git a/3rdparty/bgfx/3rdparty/ocornut-imgui/imgui_user.h b/3rdparty/bgfx/3rdparty/ocornut-imgui/imgui_user.h index daebb8d..10cfcee 100644 --- a/3rdparty/bgfx/3rdparty/ocornut-imgui/imgui_user.h +++ b/3rdparty/bgfx/3rdparty/ocornut-imgui/imgui_user.h @@ -44,7 +44,7 @@ namespace ImGui #include "widgets/color_picker.h" #include "widgets/color_wheel.h" -// #include "widgets/dock.h" +#include "widgets/dock.h" #include "widgets/file_list.h" #include "widgets/gizmo.h" #include "widgets/memory_editor.h" diff --git a/3rdparty/bgfx/examples/common/imgui/imgui.cpp b/3rdparty/bgfx/examples/common/imgui/imgui.cpp index b634b87..2cf78ad 100644 --- a/3rdparty/bgfx/examples/common/imgui/imgui.cpp +++ b/3rdparty/bgfx/examples/common/imgui/imgui.cpp @@ -299,10 +299,13 @@ struct OcornutImguiContext , 0 , bgfx::copy(data, width*height*4) ); + + ImGui::InitDockContext(); } void destroy() { + ImGui::ShutdownDockContext(); ImGui::Shutdown(); bgfx::destroy(s_tex); diff --git a/3rdparty/bgfx/local_modifications.diff b/3rdparty/bgfx/local_modifications.diff new file mode 100644 index 0000000..2dd606b --- /dev/null +++ b/3rdparty/bgfx/local_modifications.diff @@ -0,0 +1,46 @@ +diff --git a/3rdparty/bgfx/3rdparty/ocornut-imgui/imgui_user.h b/3rdparty/bgfx/3rdparty/ocornut-imgui/imgui_user.h +index daebb8d..10cfcee 100644 +--- a/3rdparty/bgfx/3rdparty/ocornut-imgui/imgui_user.h ++++ b/3rdparty/bgfx/3rdparty/ocornut-imgui/imgui_user.h +@@ -44,7 +44,7 @@ namespace ImGui + + #include "widgets/color_picker.h" + #include "widgets/color_wheel.h" +-// #include "widgets/dock.h" ++#include "widgets/dock.h" + #include "widgets/file_list.h" + #include "widgets/gizmo.h" + #include "widgets/memory_editor.h" +diff --git a/3rdparty/bgfx/examples/common/imgui/imgui.cpp b/3rdparty/bgfx/examples/common/imgui/imgui.cpp +index b634b87..2cf78ad 100644 +--- a/3rdparty/bgfx/examples/common/imgui/imgui.cpp ++++ b/3rdparty/bgfx/examples/common/imgui/imgui.cpp +@@ -299,10 +299,13 @@ struct OcornutImguiContext + , 0 + , bgfx::copy(data, width*height*4) + ); ++ ++ ImGui::InitDockContext(); + } + + void destroy() + { ++ ImGui::ShutdownDockContext(); + ImGui::Shutdown(); + + bgfx::destroy(s_tex); +diff --git a/3rdparty/bgfx/src/amalgamated.cpp b/3rdparty/bgfx/src/amalgamated.cpp +index 542436d..6d81fc6 100644 +--- a/3rdparty/bgfx/src/amalgamated.cpp ++++ b/3rdparty/bgfx/src/amalgamated.cpp +@@ -19,8 +19,8 @@ + #include "renderer_gl.cpp" + #include "renderer_vk.cpp" + #include "renderer_gnm.cpp" +-// #include "shader_dxbc.cpp" +-// #include "shader_dx9bc.cpp" ++#include "shader_dxbc.cpp" ++#include "shader_dx9bc.cpp" + #include "shader_spirv.cpp" + #include "topology.cpp" + #include "vertexdecl.cpp" diff --git a/3rdparty/bgfx/src/amalgamated.cpp b/3rdparty/bgfx/src/amalgamated.cpp index 542436d..6d81fc6 100644 --- a/3rdparty/bgfx/src/amalgamated.cpp +++ b/3rdparty/bgfx/src/amalgamated.cpp @@ -19,8 +19,8 @@ #include "renderer_gl.cpp" #include "renderer_vk.cpp" #include "renderer_gnm.cpp" -// #include "shader_dxbc.cpp" -// #include "shader_dx9bc.cpp" +#include "shader_dxbc.cpp" +#include "shader_dx9bc.cpp" #include "shader_spirv.cpp" #include "topology.cpp" #include "vertexdecl.cpp"