| Summary: | An empty cliprect causes clipping to be disabled | ||
|---|---|---|---|
| Product: | SDL | Reporter: | (disabled) Jørgen Tjernø <jorgen> |
| Component: | render | Assignee: | (disabled) Jørgen Tjernø <jorgen> |
| Status: | RESOLVED FIXED | QA Contact: | Sam Lantinga <slouken> |
| Severity: | major | ||
| Priority: | P2 | ||
| Version: | 2.0.3 | ||
| Hardware: | All | ||
| OS: | All | ||
I'll be fixing this. Fixed in https://hg.libsdl.org/SDL/rev/c7174f961388 Sam: Can you review the change and close the bug if it looks good? Looks good, thanks! |
Doing the following does not do what is expected: SDL_Rect rect = { 0, 0, 0, 0 }; SDL_RenderSetClipRect(pRenderer, &rect); Expected behavior: - Clip every draw, preventing any rendering from happening. Actual behavior: - Disable clipping entirely, allowing every render to render to each pixel. The comments for SDL_RenderSetClipRect's second parameter say: "A pointer to the rectangle to set as the clip rectangle, or NULL to disable clipping." This seems to just be a bug, since it internally sets the clip rect to a zero rect when you disable clipping, so the underlying subsystems can't distinguish from an empty rect and clipping disabled.