ImGui Demo Window working. Build working on Linux.

Gui_Panel_Refactor
Joey Pollack 4 years ago
parent f61c3c7c47
commit 84cb646512

@ -2,4 +2,5 @@
# This script expects to be run from the parent directory
# ex. scripts/build.sh
make -C build/
make -C build/
cp test_data/lunarium_state.xml build/lunarium_state.xml

@ -75,6 +75,7 @@ namespace lunarium
mbShowDemo = true;
Logger::Log(LogCategory::GRAPHICS, LogLevel::INFO, "ImGui setup");
mbIsInit = true;
return OpRes::OK();
}
@ -101,6 +102,7 @@ namespace lunarium
{
if (!mbIsInit)
return;
ImGui::ShowDemoWindow(&mbShowDemo);
ImGui::Render();
@ -108,10 +110,10 @@ namespace lunarium
if (ImGui::GetIO().ConfigFlags & ImGuiConfigFlags_ViewportsEnable)
{
GLFWwindow* backup_current_context = glfwGetCurrentContext();
//GLFWwindow* backup_current_context = glfwGetCurrentContext();
ImGui::UpdatePlatformWindows();
ImGui::RenderPlatformWindowsDefault();
glfwMakeContextCurrent(backup_current_context);
//glfwMakeContextCurrent(backup_current_context);
}
}
}

@ -7,8 +7,8 @@
*
******************************************************************************/
#include "InternalFont.h"
#include "InternalFontData.h"
#include "internalFont.h"
#include "internalFontData.h"
#include <utils/logger.h>
#include <fstream>

@ -11,6 +11,7 @@
#include <window/window.h>
#include "inputManager.h"
#include <utils/logger.h>
#include <cstring>
namespace lunarium
{

@ -62,7 +62,7 @@ namespace lunarium
k.Code = (KeyCode)(i + 48);
char name[2];
sprintf_s(name, 2, "%d", i);
sprintf(name, "%d", i);
k.Name = std::string(name);
k.ShiftName = std::string() + numShift[i];

@ -7,7 +7,7 @@
#include <imgui_impl_opengl3.h>
#include <pugixml.hpp>
#include "utils/logger.h"
#include "utils/OpRes.h"
#include "utils/opRes.h"
#include "core/state.h"
#include "core/version.h"
#include "utils/args.h"
@ -230,10 +230,10 @@ int main(int argc, char** argv)
// For this specific demo app we could also call glfwMakeContextCurrent(window) directly)
if (io.ConfigFlags & ImGuiConfigFlags_ViewportsEnable)
{
GLFWwindow* backup_current_context = glfwGetCurrentContext();
// GLFWwindow* backup_current_context = glfwGetCurrentContext();
ImGui::UpdatePlatformWindows();
ImGui::RenderPlatformWindowsDefault();
glfwMakeContextCurrent(backup_current_context);
//glfwMakeContextCurrent(backup_current_context);
}
glfwSwapBuffers(window);

Loading…
Cancel
Save