-
-
Notifications
You must be signed in to change notification settings - Fork 10.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
glfw is calling imgui's callbacks but imgui is not responsive #4747
Comments
Are you calling the backends _NewFrame() functions correctly and before the ImGui::NewFrame() function? Refer to the provided examples and compare your code carefully to them. |
yes .. and im calling them in the right order just like the example void ImGuiLayer::begin() {
ImGui_ImplOpenGL3_NewFrame();
ImGui_ImplGlfw_NewFrame();
ImGui::NewFrame();
}
void ImGuiLayer::end() {
ImGuiIO& io = ImGui::GetIO();
App& app = App::get();
io.DisplaySize = ImVec2((float)app.getWindow().getWidth(), (float)app.getWindow().getHeight());
// Rendering
ImGui::Render();
ImGui_ImplOpenGL3_RenderDrawData(ImGui::GetDrawData());
if (io.ConfigFlags & ImGuiConfigFlags_ViewportsEnable) {
GLFWwindow* backup_current_context = glfwGetCurrentContext();
ImGui::UpdatePlatformWindows();
ImGui::RenderPlatformWindowsDefault();
glfwMakeContextCurrent(backup_current_context);
}
} I have begin and end before after every imgui call and when i start a window twice it's just fine but when i start it just one time or start another window it doesn't work the mouse effects work but it's controllable .. here a gif to show it : Kooha-11-22-2021-15-29-51.mp4and when i try to control using the keyboard this assert fails :
|
updated to the last commit and the assert doesn't fail anymore still can't control anything tho .. |
solved the bug .. i was calling ImGui::newFrame before rendering, thanks for the help |
In the examples it is called before rendering... |
Version/Branch of Dear ImGui:
Version: 1.86
Branch: docking
Back-end/Renderer/Compiler/OS
Back-ends: imgui_impl_glfw.cpp + imgui_impl_opengl3.cpp (or specify if using a custom engine/back-end)
Compiler: gcc
Operating System: arch linux
My Issue/Question:
I'm trying to integrate imgui in my engine and I'm using glfw and opengl the problem is the imgui is not responsive at all .. the glfw is calling imgui's call back .. not sure what can be the problem
Screenshots/Video
https://user-images.githubusercontent.com/36560490/142741741-1c627953-5957-4f94-a3fa-8dfded275ea3.mp4
glfw is calling imgui's function
https://user-images.githubusercontent.com/36560490/142741831-832db75d-a4d4-4710-97a7-766caee9f866.mp4
imgui is not responsive at all
The text was updated successfully, but these errors were encountered: