Skip to content

Commit

Permalink
Fix incorrect culling of multi config scroll containers
Browse files Browse the repository at this point in the history
  • Loading branch information
nicbarker committed Dec 18, 2024
1 parent 004ed63 commit 8e53e16
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion clay.h
Original file line number Diff line number Diff line change
Expand Up @@ -2603,7 +2603,7 @@ void Clay__CalculateFinalLayout() {
.id = currentElement->id,
};

bool offscreen = Clay__ElementIsOffscreen(&currentElementBoundingBox, scrollOffset);
bool offscreen = Clay__ElementIsOffscreen(&currentElementBoundingBox, CLAY__INIT(Clay_Vector2) {});
// Culling - Don't bother to generate render commands for rectangles entirely outside the screen - this won't stop their children from being rendered if they overflow
bool shouldRender = !offscreen;
switch (elementConfig->type) {
Expand Down

0 comments on commit 8e53e16

Please sign in to comment.