Skip to content

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