Browse Source

update imgui

master
cinnaboot 8 years ago
parent
commit
679f11c365
  1. 3
      src/gooey.h

3
src/gooey.h

@ -18,6 +18,7 @@ void renderGooey(SDL_Handles &handles, HexDrawMode &mode);
bool bool
initGooey(SDL_Handles &handles, v2i vp_dims /*TODO: pass in game state*/) initGooey(SDL_Handles &handles, v2i vp_dims /*TODO: pass in game state*/)
{ {
IMGUI_CHECKVERSION();
ImGui::CreateContext(); ImGui::CreateContext();
ImGuiIO& io = ImGui::GetIO(); (void)io; ImGuiIO& io = ImGui::GetIO(); (void)io;
ImGui_ImplSdlGL3_Init(handles.window); ImGui_ImplSdlGL3_Init(handles.window);
@ -32,6 +33,7 @@ void
shutdownGooey() shutdownGooey()
{ {
ImGui_ImplSdlGL3_Shutdown(); ImGui_ImplSdlGL3_Shutdown();
ImGui::DestroyContext();
} }
bool bool
@ -75,6 +77,7 @@ renderGooey(SDL_Handles &handles, HexDrawMode &mode, bool &is_debug)
ImGui::SameLine(); ImGui::TextUnformatted(is_debug ? "true" : "false"); ImGui::SameLine(); ImGui::TextUnformatted(is_debug ? "true" : "false");
ImGui::Render(); ImGui::Render();
ImGui_ImplSdlGL3_RenderDrawData(ImGui::GetDrawData());
} }
#endif // GOOEY_H #endif // GOOEY_H

Loading…
Cancel
Save