Created
May 12, 2017 01:59
-
-
Save vincentdesmares/be419e89d89f821a092b9b538d755c81 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var numCoordinates = 3; // The numbers of coordinates per vertex. Here 3 coordinates (x,y,z). | |
var type = gl.FLOAT; // The size of each element is a float. | |
var normalize = false; //we don’t want to normalize the values here. | |
var stride = 3 * 4 ; // the length of the stride in bytes (the size of a float in bytes is 4). | |
var offset = 0; // the offset in bytes between the vertices. | |
gl.vertexAttribPointer(attributePositionAttribute, numCoordinates, type, normalize, stride, offset); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment