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

[rmodels] Remove redundant call for disabling vertex color attribute #3871

Merged
merged 1 commit into from
Mar 18, 2024

Conversation

zyperpl
Copy link
Contributor

@zyperpl zyperpl commented Mar 16, 2024

This PR removes the call to rlDisableVertexAttribute for SHADER_LOC_VERTEX_COLOR in DrawMesh and DrawMeshInstanced, because it was being called in cases where this location is not set in the shader. This resulted in an invalid value (-1) being passed to rlDisableVertexAttribute which made an OpenGL error GL_INVALID_VALUE.

Furthermore the same function is already being called with correct checks (checking if location attribute is set and vboId[3]==0) few lines above (rmodels.c:1450 and rmodels.c:1671 in the original source).

This solves issue #3841

@raysan5 raysan5 merged commit 9cf408f into raysan5:master Mar 18, 2024
@raysan5
Copy link
Owner

raysan5 commented Mar 18, 2024

@zyperpl thanks for the review!

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.

2 participants