-
-
Notifications
You must be signed in to change notification settings - Fork 11.2k
Closed
Labels
Description
Version/Branch of Dear ImGui:
1.90.2 and before
Back-ends:
Win32 DirectX11
Compiler, OS:
MSVC, Windows 10
Full config/build information:
No response
Details:
Was trying around with AddImage in ImGui.NET and noticed that giving the AddImage/Image functions p_max that exceed the image width/height leads to a 1 pixel line being added on top of it.
This doesn't happen with the exact size or smaller size.
So i tried the same in the DirectX11 example provided for C ImGui and it produces the same result.
Looking through the web for DirectX11 issues with this specific problem, i couldn't find anything, so i wondered if this is ImGui doing something wrong
Screenshots/Video:
The result in the ImGui preview window, very noticeable line above it
And here the used texture for this test
Minimal, Complete and Verifiable Example code:
int my_image_width = 0;
int my_image_height = 0;
ID3D11ShaderResourceView* my_texture = NULL;
bool ret = LoadTextureFromFile("0.png", &my_texture, &my_image_width, &my_image_height);
IM_ASSERT(ret);
ImGui::PushStyleColor(2, ImVec4(1, 1, 1, 1));
ImGui::Begin("DirectX11 Texture Test");
ImGui::Image((void*)my_texture, ImVec2(my_image_width, my_image_height));
ImGui::SameLine();
ImGui::Image((void*)my_texture, ImVec2(my_image_width * 2, my_image_height * 2));
ImGui::End();
ImGui::PopStyleColor();