Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[rlgl] Preserve texture on mode switching #4364

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

Destructor17
Copy link

@Destructor17 Destructor17 commented Oct 4, 2024

rlBegin resets texture to default when drawing mode switches. This PR makes rlBegin preserve texture. Since many routines expect texture to be default if not explicitly specified, rlEnd now resets texture to default.

Fixes #4347

@raysan5
Copy link
Owner

raysan5 commented Oct 6, 2024

@Destructor17 I can't remember now but I'm sure there was a reason why texture reseting was not done on rlEnd(), I think it was related to batch buffer filling in the middle of drawing before reaching rlEnd() but not sure. I prefer to avoid this change for now but we can keep the PR open for further investigation and testing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[rlgl][rshapes] rlBegin discards texture when drawing mode switches
2 participants