Skip to content

Commit 882fa8b

Browse files
committed
Fix clip rect size comparison
1 parent 6d1c68e commit 882fa8b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

imgui-SFML.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1031,7 +1031,7 @@ void RenderDrawLists(ImDrawData* draw_data)
10311031
clip_rect.w = (pcmd->ClipRect.w - clip_off.y) * clip_scale.y;
10321032

10331033
if (clip_rect.x < static_cast<float>(fb_width) && clip_rect.y < static_cast<float>(fb_height) &&
1034-
clip_rect.z >= 0.0f && clip_rect.w >= 0.0f)
1034+
clip_rect.z - clip_rect.x >= 0.0f && clip_rect.w - clip_rect.y >= 0.0f)
10351035
{
10361036
// Apply scissor/clipping rectangle
10371037
glScissor((int)clip_rect.x,

0 commit comments

Comments
 (0)