Skip to content

Commit 76c5db5

Browse files
committed
fix(ide): fix ImGui 1.91.9 API compat and AssetManager constructor
1 parent f78401f commit 76c5db5

3 files changed

Lines changed: 3 additions & 11 deletions

File tree

src/editor/ImGuiIntegration.hpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,13 +23,12 @@ class ImGuiIntegration {
2323
ImGui::CreateContext();
2424

2525
ImGuiIO& io = ImGui::GetIO();
26-
io.ConfigFlags |= ImGuiConfigFlags_DockingEnable;
2726
io.ConfigFlags |= ImGuiConfigFlags_NavEnableKeyboard;
2827

2928
ImGui_ImplSDL3_InitForSDLGPU(window);
3029

3130
ImGui_ImplSDLGPU3_InitInfo initInfo{};
32-
initInfo.GpuDevice = device->nativeDevice();
31+
initInfo.Device = device->nativeDevice();
3332
initInfo.ColorTargetFormat = SDL_GetGPUSwapchainTextureFormat(
3433
device->nativeDevice(), window);
3534

@@ -56,7 +55,7 @@ class ImGuiIntegration {
5655
void prepareRender(RHI::CommandBuffer* cmd) {
5756
if (!m_initialized) return;
5857
ImGui::Render();
59-
ImGui_ImplSDLGPU3_PrepareDrawData(ImGui::GetDrawData(), cmd->nativeHandle());
58+
Imgui_ImplSDLGPU3_PrepareDrawData(ImGui::GetDrawData(), cmd->nativeHandle());
6059
}
6160

6261
void endFrame(RHI::CommandBuffer* cmd) {

src/editor/SceneEditor.hpp

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -149,13 +149,6 @@ class SceneEditor {
149149
}
150150

151151
void setupDockingLayout() {
152-
ImGuiID dockspaceId = ImGui::DockSpaceOverViewport(
153-
0,
154-
ImGui::GetMainViewport(),
155-
ImGuiDockNodeFlags_PassthruCentralNode);
156-
157-
// Only setup once
158-
if (m_dockingSetup) return;
159152
m_dockingSetup = true;
160153
}
161154

tools/ide/main.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ int main(int, char**) {
4141
return 1;
4242
}
4343

44-
Caffeine::Assets::AssetManager assetManager;
44+
Caffeine::Assets::AssetManager assetManager(nullptr, "assets");
4545
Caffeine::ECS::World world;
4646
Caffeine::Render::Camera2D editorCamera;
4747

0 commit comments

Comments
 (0)