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

Calculate vertex stride based on bindings size #2029

Closed
wants to merge 2 commits into from

Conversation

rnd-ash
Copy link
Contributor

@rnd-ash rnd-ash commented Nov 21, 2022

Potentially a breaking change. This needs more testing.

This fixes #2028

VertexAttribPointer calls now take into account the total size of all bindings for the vertex in order to better calculate the vertex stride size

@est31
Copy link
Collaborator

est31 commented Nov 21, 2022

Right now the stride seems to be calculated from the get_elements_size function, which in most instances just calls mem::size_of::<T> for T being the vertex type. I'm not sure this is wrong, although the new_raw function you quoted in #2028 does seem wrong indeed.

@rnd-ash rnd-ash closed this Nov 21, 2022
@rnd-ash
Copy link
Contributor Author

rnd-ash commented Nov 21, 2022

Re-opened as #2031. Accidently pushed a commit not intended for this change

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.

vertex_array_object.rs VertexAttribPointer stride being set incorrectly
2 participants