clean up debug

This commit is contained in:
2025-03-22 01:53:10 -05:00
parent 4bd2d6908e
commit 92294c3166
2 changed files with 8 additions and 8 deletions

View File

@@ -21,31 +21,25 @@ void TestImgui::onLoad() {
createWindow(); createWindow();
std::cout << "Check version" << std::endl; window->getRenderer().init();
IMGUI_CHECKVERSION(); IMGUI_CHECKVERSION();
std::cout << "CreateContext" << std::endl;
ImGui::CreateContext(); ImGui::CreateContext();
std::cout << "GetIO" << std::endl;
ImGuiIO& io = ImGui::GetIO(); (void)io; ImGuiIO& io = ImGui::GetIO(); (void)io;
io.ConfigFlags |= ImGuiConfigFlags_NavEnableKeyboard; // Enable Keyboard Controls io.ConfigFlags |= ImGuiConfigFlags_NavEnableKeyboard; // Enable Keyboard Controls
io.ConfigFlags |= ImGuiConfigFlags_NavEnableGamepad; // Enable Gamepad Controls io.ConfigFlags |= ImGuiConfigFlags_NavEnableGamepad; // Enable Gamepad Controls
std::cout << "Set Style" << std::endl;
// Setup Dear ImGui style // Setup Dear ImGui style
ImGui::StyleColorsDark(); ImGui::StyleColorsDark();
//ImGui::StyleColorsLight(); //ImGui::StyleColorsLight();
std::cout << "ImGui_ImplGlfw_InitForOpenGL" << std::endl;
// Setup Platform/Renderer backends // Setup Platform/Renderer backends
ImGui_ImplGlfw_InitForOpenGL(window->getWindowImpl().getWindow(), true); ImGui_ImplGlfw_InitForOpenGL(window->getWindowImpl().getWindow(), true);
std::cout << "ImGui_ImplOpenGL3_Init" << std::endl;
ImGui_ImplOpenGL3_Init("#version 130"); ImGui_ImplOpenGL3_Init("#version 130");
std::cout << "Successful onLoad" << std::endl;
} }
void TestImgui::run() { void TestImgui::run() {
ImGui_ImplOpenGL3_NewFrame(); ImGui_ImplOpenGL3_NewFrame();
ImGui_ImplGlfw_NewFrame(); ImGui_ImplGlfw_NewFrame();
ImGui::NewFrame(); ImGui::NewFrame();
@@ -58,4 +52,8 @@ void TestImgui::run() {
ImGui_ImplOpenGL3_RenderDrawData(ImGui::GetDrawData()); ImGui_ImplOpenGL3_RenderDrawData(ImGui::GetDrawData());
}); });
if(window->shouldClose())
app.end();
window->doFrame();
} }

View File

@@ -13,6 +13,8 @@ namespace Archimedes {
~Renderer() {} ~Renderer() {}
void init() { r.init(); }
void render(); void render();
void addRenderCmd(renderCmd* cmd) { rc.push_back(cmd); } void addRenderCmd(renderCmd* cmd) { rc.push_back(cmd); }