Use static D3D11 device and context

This commit is contained in:
Simon Lübeß
2021-10-13 22:56:22 +02:00
parent 84daee95e4
commit 0cbbf94fe6
51 changed files with 448 additions and 345 deletions
+10 -3
View File
@@ -5,6 +5,13 @@ using ImGuizmo;
using internal ImGui;
#if GE_D3D11
using GlitchyEngine.Platform.DX11;
using internal GlitchyEngine.Platform.DX11;
#endif
namespace GlitchyEngine.ImGui
{
public class ImGuiLayer : Layer
@@ -40,10 +47,10 @@ namespace GlitchyEngine.ImGui
#if GE_WINDOWS
// Todo: temporary, needs to be platform independent
ImGuiImplWin32.Init((void*)(uint)(Windows.HWnd)(int)Application.Get().Window.NativeWindow);
#endif
var context = Application.Get().Window.Context;
ImGuiImplDX11.Init(context.[Friend]nativeDevice, context.[Friend]nativeContext);
#if GE_D3D11
ImGuiImplDX11.Init(NativeDevice, NativeContext);
#endif
}