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

Consistently use the padded element size #93

Merged
merged 1 commit into from
Jun 29, 2023

Conversation

javagl
Copy link
Owner

@javagl javagl commented Jun 29, 2023

According to 3.6.2.4. Data Alignment of the specification, padding bytes have to be inserted at the end of columns of certain MATn types. The general difference between an "element size" and an "element size with padding" may be that

  • the element size for a MAT2 with GL_BYTE is 4
  • the element size with padding for a MAT2 with GL_BYTE is 8

This was already anticipated, e.g. with the ElementType class. But some classes (most importantly the BufferStructureBuilder) did not anticipate this, and did write 'wrong' data into the buffers when the inputs have been one of the affected matrix types.

@javagl javagl merged commit 2886de8 into master Jun 29, 2023
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.

1 participant