Skip to content

Exercise: interleaved attributes confusion #91

@nelsonvassalo

Description

@nelsonvassalo

How do we compute the byte values for our images?

  gl.enableVertexAttribArray(0)
  gl.vertexAttribPointer(0, 2, gl.FLOAT, false, 16, 0)

  gl.enableVertexAttribArray(1)
  gl.vertexAttribPointer(1, 2, gl.FLOAT, false, 16, 8)

The solution tells us is 16, but why? And why is the second "geometry" offset by only 8 then? Assuming it starts at the end of the previous, shouldn't it be at 17?

Thanks

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions