-
-
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
Small window flickering when move out the edge of main window. #7579
Comments
Can you clarify what you mean by flickering by capturing a video of it? |
It seems to be because if (io.ConfigFlags & ImGuiConfigFlags_ViewportsEnable)
{
ImGui::UpdatePlatformWindows();
ImGui::RenderPlatformWindowsDefault();
} And immediately after you are swapping the current GL context which is the wrong context: glfwSwapBuffers(window); If you look at our example, we are doing: // Update and Render additional Platform Windows
// (Platform functions may change the current OpenGL context, so we save/restore it to make it easier to paste this code elsewhere.
// For this specific demo app we could also call glfwMakeContextCurrent(window) directly)
if (io.ConfigFlags & ImGuiConfigFlags_ViewportsEnable)
{
GLFWwindow* backup_current_context = glfwGetCurrentContext();
ImGui::UpdatePlatformWindows();
ImGui::RenderPlatformWindowsDefault();
glfwMakeContextCurrent(backup_current_context);
}
glfwSwapBuffers(window); You can also store the main GL context and |
oh, it works! |
There is a Getting Started guide there: And i'm trying to better populate the Wiki over time but there's so much to do. Glad it solved your problem! |
Version/Branch of Dear ImGui:
Version 1.90.6, Branch: docking (master/docking/etc.)
Back-ends:
imgui_impl_opengl3.cpp + imgui_impl_glfw.cpp
Compiler, OS:
Windows 10 + MSVC 2022
Full config/build information:
imgui config on the computer in problem.
imgui config on the computer without problem.
Details:
When I move the small window out of the main window, flickering occurs when it reaches the edge. This is a screenshot of one of the frames.
In my other computer(same as Windows 10 and MSVC 2022)this problem not occur.
The reason I encountered this issue is because I initially wanted to leverage the cross-platform capabilities of GLFW + OpenGL 3, using CMake to quickly set up an ImGui template on various platforms. Below is the link:
https://github.com/JTtNinjaCode/Dear_Imgui_Template.git
Screenshots/Video:
No response
Minimal, Complete and Verifiable Example code:
Code, modify from you example code, but use docking branch, add viewport and docking feature.
Add these code into example code with opengl3 and glfw as backends:
Full Code:
The text was updated successfully, but these errors were encountered: