imgui
IMGUI é uma gui de modo imediato para DirectX e OpenGL
Características
- Leve
- Livre de plataforma
Código de amostra
/* Loop until the user closes the window */ while( !glfwWindowShouldClose(window) ){ /* Poll for and process events */ glfwPollEvents(); ImGui_ImplGlfw_NewFrame(); // Show a simple window // Tip: if we don't call ImGui::Begin()/ImGui::End() the widgets appear in a window automatically called "Debug" { static float f = 0.0f; ImGui::Text("Hello World"); ImGui::SliderFloat("float", &f, 0.0f, 1.0f); } // Rendering glViewport(0, 0, (int)ImGui::GetIO().DisplaySize.x, (int)ImGui::GetIO().DisplaySize.y); glClearColor(clear_color.x, clear_color.y, clear_color.z, clear_color.w); glClear(GL_COLOR_BUFFER_BIT); ImGui::Render(); /* Swap front and back buffers */ glfwSwapBuffers(window); }
LInks
https://github.com/ocornut/imgui: Página oficial da biblioteca no Github
http://www.johno.se/book/imgui.pdf: PDF (em inglês) sobre GUIs em modo imediato
Código simples para uma aplicação: http://www.4shared.com/archive/jPlMH6Ntba/TestImGUI.html
revisão da página: 5, última edição: 16 Jun 2016 00:25