Repository navigation
[examples] Skip empty areas in tiled texture drawing - #6412
Merged
raysan5 merged 1 commit intoNov 13, 2026
Merged
Conversation
Owner
|
@yex743055-sudo thanks for the review |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
In
textures_tiled_drawing, shrinking the client area below 236 px makes the tiling width negative.DrawTexturePro()treats the negative destination size as positive, so the example can draw an extra strip inside the window's right margin.Skip the tiling pass when its destination width or height is zero or negative.
Related to the example-testing discussion in #5664.
Windows x64, Visual Studio 2022, GLFW: built the example and checked pixels using the same C test before and after the change. A 232 px client width left the margin clear after the fix. Zero-sized destinations remained clear, and positive single-tile, one-row, one-column and restored 800 px cases still rendered. The test also checked a negative destination height.
WSL Ubuntu 24.04, GCC 13.3,
PLATFORM_MEMORY: the same eight pixel cases passed after the fix. The narrow-width case uses the computed destination directly on this backend.