Skip to content

Commit 6dc13a0

Browse files
committed
DPL: allow headless remote GUI also on macOS
1 parent 7d9d804 commit 6dc13a0

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

DebugGUI/src/DebugGUIMacos.mm

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,7 @@ static void default_error_callback(int error, const char *description) {
9595
ImGui::CreateContext();
9696
ImGuiIO &io = ImGui::GetIO();
9797
ImGui::StyleColorsDark();
98+
id<MTLDevice> device = MTLCreateSystemDefaultDevice();
9899
io.KeyMap[ImGuiKey_Tab] = GLFW_KEY_TAB;
99100
io.KeyMap[ImGuiKey_LeftArrow] = GLFW_KEY_LEFT;
100101
io.KeyMap[ImGuiKey_RightArrow] = GLFW_KEY_RIGHT;
@@ -129,6 +130,7 @@ static void default_error_callback(int error, const char *description) {
129130
if (io.Fonts->ConfigData.empty()) io.Fonts->AddFontDefault();
130131
// io.Fonts->Build();
131132
io.DisplaySize = ImVec2(1280, 720);
133+
ImGui_ImplMetal_Init(device);
132134
}
133135

134136
ImPlot::CreateContext();

0 commit comments

Comments
 (0)