Skip to content

webgl state diagram : draw on cube #420

Answered by greggman
letochagone asked this question in Q&A
Discussion options

You must be logged in to vote
gl.pixelStorei(gl.UNPACK_ALIGNMENT, 1);

is required if a row of the data is not a multiple of 4 bytes (the default UNPACK_ALIGNMENT setting). In the example, 16 bytes are being passed in. 4 rows of 4 bytes each. Because each row is 4 bytes and 4 is a multiple of 4 it works as is.

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by letochagone
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #419 on February 16, 2023 07:55.