Open gamecoder-nz opened 1 year ago
The same thing happens when you enable dockspace by default static bool show_app_dockspace = true;
and it opens with an ImGUI window outside the main window.
What do you mean by enabling Dockspace ?
Have you checked the many other similar OpenGL rendering issues? What is your GPU and drivers version ?
If you go to the Demo Window and click Examples -> Dockspace to enable it. I have just turned off ImGuiConfigFlags_ViewportsEnable
and there is no issue.
My GPU is Intel UHD and drive version 26.20.100.7463
LIkely same as #5617, #4832
Could you uncomment the //printf() line in imgui_impl_opengl3.cpp, share your values for vendor, renderer etc. Confirm the resulting value of UseBufferSubData? And see if inverting this value to use the other code path makes a difference for you?
I'm desperate to find a correct solution for OpenGL support has become a minefield and more big applications are white-listed and tailor supported by drivers, dear imgui being a library makes it difficult so we'll have to keep poking to find a solution.
GL_MAJOR_VERSION = 3 GL_MINOR_VERSION = 0 GL_VENDOR = 'Intel' GL_RENDERER = 'Intel(R) UHD Graphics'
Yes inverting UserBufferSubData
fixed the issue.
Hey, I also ran into this same issues on a computer that only has Intel HD Graphics.
GL_MAJOR_VERSION = 3
GL_MINOR_VERSION = 0
GL_VENDOR = 'Intel'
GL_RENDERER = 'Intel(R) HD Graphics 630'
Interestingly enough, this seems to be a recent phenomena. I was using older drivers first which caused immediate crashes due to heap corruption deep inside of the Intel driver code when swapBuffers was called after undocking a window from the main window. After updating the drivers to the latest version available, the crash is gone but the artifacts mentioned above are visible. For me it can also be fixed by setting UseBufferSubData
to false but I guess that's not really a solution since it seems to fix the issues on other systems.
I really don't understand how Intel's drivers can be so horribly broken. I had to disable a bunch of other features too on Intel HD Graphics since they lead to rendering issues there. Most notably, the entire window content was just offset weirdly when disabling Windows' window boarders
Thanks for the extra data point. I'm currently gathering info from the many posts and will act upon that. Stay tuned.
Posting a shared recap here: (will update as necessary) https://gist.github.com/ocornut/89ae5820c497510761e4c313ef5e0219
@WerWolv @gamecoder-nz & others
Could you cherry-pick this:
https://github.com/ocornut/imgui/commit/036ad55
And see if you get anything?
EDIT 2022/09/27 merged 11f5be0ca you can now uncomment #define IMGUI_IMPL_OPENGL_DEBUG
.
(You may alter the fprintf
statement to be whatever works best in your codebase)
EDIT Please use 3a68146 instead.
Please also try with both values of bd->UseBufferSubData
(you may simply alter the if (bd->UseBufferSubData)
statement into true/false.
Could you also try both code path using GL_DYNAMIC_DRAW
instead of GL_STREAM_DRAW
?
#define GL_DYNAMIC_DRAW 0x88E8
To the code. Thank you!
Hi, I'm having the same issue. The HelloWorld docking example very frequently results in a corrupt frozen window with GLFW/OGL3. Can you please let me know the latest work around? Thank you!
Update: I added: #define GL_DYNAMIC_DRAW 0x88E8 to the top of imconfig.h and it's working MUCH better. Update2: I still see corruption occasionally but it doesn't crash anymore. Update3: I set UseBufferSubData = false and it's working even better.
Version/Branch of Dear ImGui:
Version: 1.89 Branch: Docking
Back-end/Renderer/Compiler/OS
Back-ends: imgui_impl_glfw.cpp + imgui_impl_opengl3.cpp Compiler: Visual Studio 2022 Operating System: Windows 10
My Issue/Question:
Run the GLFW OpenGL3 example and move the Hello World panel to outside the main window. Then enable Dockspace. The Hello World window gets corrupted
Screenshots/Video