Skip to content

Commit

Permalink
Update imgui to 1.90.8
Browse files Browse the repository at this point in the history
  • Loading branch information
drhelius committed Jun 8, 2024
1 parent 209e7d0 commit c4c7880
Show file tree
Hide file tree
Showing 11 changed files with 2,159 additions and 1,076 deletions.
1,215 changes: 773 additions & 442 deletions platforms/desktop-shared/imgui/imgui.cpp

Large diffs are not rendered by default.

353 changes: 215 additions & 138 deletions platforms/desktop-shared/imgui/imgui.h

Large diffs are not rendered by default.

471 changes: 335 additions & 136 deletions platforms/desktop-shared/imgui/imgui_demo.cpp

Large diffs are not rendered by default.

353 changes: 334 additions & 19 deletions platforms/desktop-shared/imgui/imgui_draw.cpp

Large diffs are not rendered by default.

5 changes: 3 additions & 2 deletions platforms/desktop-shared/imgui/imgui_impl_opengl2.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@ static ImGui_ImplOpenGL2_Data* ImGui_ImplOpenGL2_GetBackendData()
bool ImGui_ImplOpenGL2_Init()
{
ImGuiIO& io = ImGui::GetIO();
IMGUI_CHECKVERSION();
IM_ASSERT(io.BackendRendererUserData == nullptr && "Already initialized a renderer backend!");

// Setup backend capabilities flags
Expand All @@ -108,7 +109,7 @@ void ImGui_ImplOpenGL2_Shutdown()
void ImGui_ImplOpenGL2_NewFrame()
{
ImGui_ImplOpenGL2_Data* bd = ImGui_ImplOpenGL2_GetBackendData();
IM_ASSERT(bd != nullptr && "Did you call ImGui_ImplOpenGL2_Init()?");
IM_ASSERT(bd != nullptr && "Context or backend not initialized! Did you call ImGui_ImplOpenGL2_Init()?");

if (!bd->FontTexture)
ImGui_ImplOpenGL2_CreateDeviceObjects();
Expand Down Expand Up @@ -299,4 +300,4 @@ void ImGui_ImplOpenGL2_DestroyDeviceObjects()
#pragma clang diagnostic pop
#endif

#endif // #ifndef IMGUI_DISABLE
#endif // #ifndef IMGUI_DISABLE
2 changes: 1 addition & 1 deletion platforms/desktop-shared/imgui/imgui_impl_opengl2.h
Original file line number Diff line number Diff line change
Expand Up @@ -35,4 +35,4 @@ IMGUI_IMPL_API void ImGui_ImplOpenGL2_DestroyFontsTexture();
IMGUI_IMPL_API bool ImGui_ImplOpenGL2_CreateDeviceObjects();
IMGUI_IMPL_API void ImGui_ImplOpenGL2_DestroyDeviceObjects();

#endif // #ifndef IMGUI_DISABLE
#endif // #ifndef IMGUI_DISABLE
8 changes: 5 additions & 3 deletions platforms/desktop-shared/imgui/imgui_impl_sdl2.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -306,8 +306,9 @@ static void ImGui_ImplSDL2_UpdateKeyModifiers(SDL_Keymod sdl_key_mods)
// If you have multiple SDL events and some of them are not meant to be used by dear imgui, you may need to filter events based on their windowID field.
bool ImGui_ImplSDL2_ProcessEvent(const SDL_Event* event)
{
ImGuiIO& io = ImGui::GetIO();
ImGui_ImplSDL2_Data* bd = ImGui_ImplSDL2_GetBackendData();
IM_ASSERT(bd != nullptr && "Context or backend not initialized! Did you call ImGui_ImplSDL2_Init()?");
ImGuiIO& io = ImGui::GetIO();

switch (event->type)
{
Expand Down Expand Up @@ -399,6 +400,7 @@ bool ImGui_ImplSDL2_ProcessEvent(const SDL_Event* event)
static bool ImGui_ImplSDL2_Init(SDL_Window* window, SDL_Renderer* renderer)
{
ImGuiIO& io = ImGui::GetIO();
IMGUI_CHECKVERSION();
IM_ASSERT(io.BackendPlatformUserData == nullptr && "Already initialized a platform backend!");

// Check and store if we are on a SDL backend that supports global mouse position
Expand Down Expand Up @@ -704,7 +706,7 @@ static void ImGui_ImplSDL2_UpdateGamepads()
void ImGui_ImplSDL2_NewFrame()
{
ImGui_ImplSDL2_Data* bd = ImGui_ImplSDL2_GetBackendData();
IM_ASSERT(bd != nullptr && "Did you call ImGui_ImplSDL2_Init()?");
IM_ASSERT(bd != nullptr && "Context or backend not initialized! Did you call ImGui_ImplSDL2_Init()?");
ImGuiIO& io = ImGui::GetIO();

// Setup display size (every frame to accommodate for window resizing)
Expand Down Expand Up @@ -750,4 +752,4 @@ void ImGui_ImplSDL2_NewFrame()
#pragma clang diagnostic pop
#endif

#endif // #ifndef IMGUI_DISABLE
#endif // #ifndef IMGUI_DISABLE
2 changes: 1 addition & 1 deletion platforms/desktop-shared/imgui/imgui_impl_sdl2.h
Original file line number Diff line number Diff line change
Expand Up @@ -42,4 +42,4 @@ IMGUI_IMPL_API bool ImGui_ImplSDL2_ProcessEvent(const SDL_Event* event);
enum ImGui_ImplSDL2_GamepadMode { ImGui_ImplSDL2_GamepadMode_AutoFirst, ImGui_ImplSDL2_GamepadMode_AutoAll, ImGui_ImplSDL2_GamepadMode_Manual };
IMGUI_IMPL_API void ImGui_ImplSDL2_SetGamepadMode(ImGui_ImplSDL2_GamepadMode mode, struct _SDL_GameController** manual_gamepads_array = NULL, int manual_gamepads_count = -1);

#endif // #ifndef IMGUI_DISABLE
#endif // #ifndef IMGUI_DISABLE
383 changes: 205 additions & 178 deletions platforms/desktop-shared/imgui/imgui_internal.h

Large diffs are not rendered by default.

177 changes: 123 additions & 54 deletions platforms/desktop-shared/imgui/imgui_tables.cpp

Large diffs are not rendered by default.

266 changes: 164 additions & 102 deletions platforms/desktop-shared/imgui/imgui_widgets.cpp

Large diffs are not rendered by default.

0 comments on commit c4c7880

Please sign in to comment.