Glitchy rendering? #9571

Closed
opened 2026-10-02 15:31:15 +00:00 by movercell · 3 comments
movercell commented 2026-10-02 15:31:15 +00:00 (Migrated from github.com)

Version/Branch of Dear ImGui:

Version 1.92b, Branch: docking

Back-ends:

imgui_impl_glfw.cpp + imgui_impl_vulkan.cpp

Compiler, OS:

Ubuntu 24.04 with G++ 16

Full config/build information:

// (Copy from the next line. Keep the ``` markers for formatting.)

Dear ImGui 1.92.9b (19291)
--------------------------------
sizeof(size_t): 8, sizeof(ImDrawIdx): 2, sizeof(ImDrawVert): 20
define: __cplusplus=202002
define: __linux__
define: __GNUC__=16
define: IMGUI_HAS_VIEWPORT
define: IMGUI_HAS_DOCK
IM_ASSERT: runs expression: OK. expand size: OK
--------------------------------
io.BackendPlatformName: imgui_impl_glfw (3310)
io.BackendRendererName: imgui_impl_vulkan
io.ConfigFlags: 0x00000000
io.ConfigViewportsNoDecoration
io.ConfigViewportsNoDefaultParent
io.ConfigNavCaptureKeyboard
io.ConfigInputTextCursorBlink
io.ConfigWindowsResizeFromEdges
io.ConfigMemoryCompactTimer = 60.0
io.BackendFlags: 0x00001C1E
 HasMouseCursors
 HasSetMousePos
 PlatformHasViewports
 HasMouseHoveredViewport
 RendererHasVtxOffset
 RendererHasTextures
 RendererHasViewports
--------------------------------
io.Fonts: 1 fonts, Flags: 0x00000000, TexSize: 512,128
io.Fonts->FontLoaderName: stb_truetype
io.DisplaySize: 800.00,600.00
io.DisplayFramebufferScale: 1.00,1.00
--------------------------------
style.WindowPadding: 8.00,8.00
style.WindowBorderSize: 1.00
style.FramePadding: 4.00,3.00
style.FrameRounding: 0.00
style.FrameBorderSize: 0.00
style.ItemSpacing: 8.00,4.00
style.ItemInnerSpacing: 4.00,4.00

Details:

It just does this sometimes????(both when windows first appear, or automatic resizing or like at any time)

(i use dynamic rendering if that matters)

I don't even know what to share in terms of my code that could have a hint on why that happens

Screenshots/Video:

Image

https://github.com/user-attachments/assets/1438c367-04e8-4ba0-b51c-3ffdefaf22bd

And a screenshot of the video as demonstration:

Image

Minimal, Complete and Verifiable Example code:

I have no clue at all

### Version/Branch of Dear ImGui: Version 1.92b, Branch: docking ### Back-ends: imgui_impl_glfw.cpp + imgui_impl_vulkan.cpp ### Compiler, OS: Ubuntu 24.04 with G++ 16 ### Full config/build information: // (Copy from the next line. Keep the ``` markers for formatting.) ```cpp Dear ImGui 1.92.9b (19291) -------------------------------- sizeof(size_t): 8, sizeof(ImDrawIdx): 2, sizeof(ImDrawVert): 20 define: __cplusplus=202002 define: __linux__ define: __GNUC__=16 define: IMGUI_HAS_VIEWPORT define: IMGUI_HAS_DOCK IM_ASSERT: runs expression: OK. expand size: OK -------------------------------- io.BackendPlatformName: imgui_impl_glfw (3310) io.BackendRendererName: imgui_impl_vulkan io.ConfigFlags: 0x00000000 io.ConfigViewportsNoDecoration io.ConfigViewportsNoDefaultParent io.ConfigNavCaptureKeyboard io.ConfigInputTextCursorBlink io.ConfigWindowsResizeFromEdges io.ConfigMemoryCompactTimer = 60.0 io.BackendFlags: 0x00001C1E HasMouseCursors HasSetMousePos PlatformHasViewports HasMouseHoveredViewport RendererHasVtxOffset RendererHasTextures RendererHasViewports -------------------------------- io.Fonts: 1 fonts, Flags: 0x00000000, TexSize: 512,128 io.Fonts->FontLoaderName: stb_truetype io.DisplaySize: 800.00,600.00 io.DisplayFramebufferScale: 1.00,1.00 -------------------------------- style.WindowPadding: 8.00,8.00 style.WindowBorderSize: 1.00 style.FramePadding: 4.00,3.00 style.FrameRounding: 0.00 style.FrameBorderSize: 0.00 style.ItemSpacing: 8.00,4.00 style.ItemInnerSpacing: 4.00,4.00 ``` ### Details: It just does this sometimes????(both when windows first appear, or automatic resizing or like at any time) (i use dynamic rendering if that matters) I don't even know what to share in terms of my code that could have a hint on why that happens ### Screenshots/Video: <img width="244" height="379" alt="Image" src="https://github.com/user-attachments/assets/41e02119-7a2a-47b3-997f-05ac3f5a39fa" /> https://github.com/user-attachments/assets/1438c367-04e8-4ba0-b51c-3ffdefaf22bd And a screenshot of the video as demonstration: <img width="1440" height="900" alt="Image" src="https://github.com/user-attachments/assets/e228458e-9821-4539-9717-3d475f060305" /> ### Minimal, Complete and Verifiable Example code: I have no clue at all
movercell commented 2026-10-02 15:33:59 +00:00 (Migrated from github.com)

This is how i create the context:

void createImGuiContext() {
		imguiContext = ImGui::CreateContext();
		ImGui::SetCurrentContext(imguiContext);

		ImGui_ImplGlfw_InitForVulkan(window, true);

		vk::DescriptorPoolCreateInfo imguiDescriptorPoolInfo = {};
		vk::DescriptorPoolSize pool_sizes[] = {
		    { vk::DescriptorType::eSampledImage, 1000 },
		    { vk::DescriptorType::eSampler, 1000 }
		};
		imguiDescriptorPoolInfo.flags = vk::DescriptorPoolCreateFlagBits::eFreeDescriptorSet;
		imguiDescriptorPoolInfo.maxSets = 1000;
		imguiDescriptorPoolInfo.poolSizeCount = (uint32_t)std::size(pool_sizes);
		imguiDescriptorPoolInfo.pPoolSizes = pool_sizes;
		imguiDescriptorPool = vk::raii::DescriptorPool(device, imguiDescriptorPoolInfo);

		ImGui_ImplVulkan_InitInfo init_info = {};
    	init_info.ApiVersion = VK_API_VERSION_1_3;
    	init_info.Instance = *instance;
    	init_info.PhysicalDevice = *physicalDevice;
    	init_info.Device = *device;
    	init_info.QueueFamily = graphicsQueueIndex;
    	init_info.Queue = *queue;
    	init_info.PipelineCache = VK_NULL_HANDLE;
    	init_info.DescriptorPool = *imguiDescriptorPool;
    	init_info.MinImageCount = swapChainMinImageCount;
    	init_info.ImageCount = swapChainImages.size();
    	init_info.PipelineInfoMain.Subpass = 0;
    	init_info.PipelineInfoMain.MSAASamples = VK_SAMPLE_COUNT_1_BIT;
		init_info.UseDynamicRendering = true;
		
		init_info.PipelineInfoMain.PipelineRenderingCreateInfo.sType = VK_STRUCTURE_TYPE_PIPELINE_RENDERING_CREATE_INFO;
		init_info.PipelineInfoMain.PipelineRenderingCreateInfo.colorAttachmentCount = 1;
		init_info.PipelineInfoMain.PipelineRenderingCreateInfo.pColorAttachmentFormats = reinterpret_cast<VkFormat*>(&swapChainSurfaceFormat.format);

    	ImGui_ImplVulkan_Init(&init_info);
	}
This is how i create the context: ```cpp void createImGuiContext() { imguiContext = ImGui::CreateContext(); ImGui::SetCurrentContext(imguiContext); ImGui_ImplGlfw_InitForVulkan(window, true); vk::DescriptorPoolCreateInfo imguiDescriptorPoolInfo = {}; vk::DescriptorPoolSize pool_sizes[] = { { vk::DescriptorType::eSampledImage, 1000 }, { vk::DescriptorType::eSampler, 1000 } }; imguiDescriptorPoolInfo.flags = vk::DescriptorPoolCreateFlagBits::eFreeDescriptorSet; imguiDescriptorPoolInfo.maxSets = 1000; imguiDescriptorPoolInfo.poolSizeCount = (uint32_t)std::size(pool_sizes); imguiDescriptorPoolInfo.pPoolSizes = pool_sizes; imguiDescriptorPool = vk::raii::DescriptorPool(device, imguiDescriptorPoolInfo); ImGui_ImplVulkan_InitInfo init_info = {}; init_info.ApiVersion = VK_API_VERSION_1_3; init_info.Instance = *instance; init_info.PhysicalDevice = *physicalDevice; init_info.Device = *device; init_info.QueueFamily = graphicsQueueIndex; init_info.Queue = *queue; init_info.PipelineCache = VK_NULL_HANDLE; init_info.DescriptorPool = *imguiDescriptorPool; init_info.MinImageCount = swapChainMinImageCount; init_info.ImageCount = swapChainImages.size(); init_info.PipelineInfoMain.Subpass = 0; init_info.PipelineInfoMain.MSAASamples = VK_SAMPLE_COUNT_1_BIT; init_info.UseDynamicRendering = true; init_info.PipelineInfoMain.PipelineRenderingCreateInfo.sType = VK_STRUCTURE_TYPE_PIPELINE_RENDERING_CREATE_INFO; init_info.PipelineInfoMain.PipelineRenderingCreateInfo.colorAttachmentCount = 1; init_info.PipelineInfoMain.PipelineRenderingCreateInfo.pColorAttachmentFormats = reinterpret_cast<VkFormat*>(&swapChainSurfaceFormat.format); ImGui_ImplVulkan_Init(&init_info); } ```
ocornut commented 2026-10-02 16:44:31 +00:00 (Migrated from github.com)

Does it happen if you compile examples/example_glfw_vulkan/main.cpp and run it unmodified?

Does it happen if you compile `examples/example_glfw_vulkan/main.cpp` and run it unmodified?
movercell commented 2026-10-02 16:49:50 +00:00 (Migrated from github.com)

It does not and this is definitely an issue on my side, I just have no idea why

It does not and this is definitely an issue on my side, I just have no idea why
Sign in to join this conversation.
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
ocornut/imgui#9571
No description provided.