gfxfundamentals / webgl2-fundamentals

WebGL 2 lessons starting from the basics
https://webgl2fundamentals.org
BSD 3-Clause "New" or "Revised" License
1.76k stars 220 forks source link

An example vertexAttribPointer call is missing the "normalized" param #217

Open aaronwhyte opened 10 months ago

aaronwhyte commented 10 months ago

On https://webgl2fundamentals.org/webgl/lessons/webgl-less-code-more-fun.html, one of the example gl.vertexAttributePointer() calls, the one for a_texcoordLoc, is missing the boolean "normalized" param:

// Setup all the buffers and attributes (assuming you made the buffers already)
...
gl.vertexAttribPointer(a_positionLoc, positionNumComponents, gl.FLOAT, false, 0, 0);
...
gl.vertexAttribPointer(a_normalLoc, normalNumComponents, gl.FLOAT, false, 0, 0);
...
gl.vertexAttribPointer(a_texcoordLoc, texcoordNumComponents, gl.FLOAT, 0, 0);
greggman commented 10 months ago

thanks! fixed https://github.com/gfxfundamentals/webgl2-fundamentals/commit/5110106ecd289e3cee15a050b7be8bb50cda5b43