webgl2-fundamentals icon indicating copy to clipboard operation
webgl2-fundamentals copied to clipboard

For Position Explain

Open AlexTerry1024 opened this issue 1 year ago • 1 comments

Hello, How are you?

createBufferAndSetupAttribute(positionLoc, [ -1, -1, 1, -1, -1, 1, -1, 1, 1, -1, 1, 1, ]);

For those position, I hope you explain the position usage.

Thank you.

AlexTerry1024 avatar Sep 16 '22 01:09 AlexTerry1024

@AlexTerry1024

Please review the first lesson: https://webgl2fundamentals.org/webgl/lessons/webgl-fundamentals.html

// three 2d points var positions = [ 0, 0, 0, 0.5, 0.7, 0, ];

So the positions you given will draw two triangles, they fill the entire canvas.

Mookiepiece avatar Sep 22 '22 00:09 Mookiepiece