Skip to content

Instantly share code, notes, and snippets.

@haeric
Created May 14, 2014 18:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save haeric/5d1e273b4ee1aa84776d to your computer and use it in GitHub Desktop.
Save haeric/5d1e273b4ee1aa84776d to your computer and use it in GitHub Desktop.
if ( updateBuffers ) {
setupVertexAttributes( material, programAttributes, geometryAttributes, startIndex );
_gl.bindBuffer( _gl.ELEMENT_ARRAY_BUFFER, index.buffer );
}
// render indexed triangles
_gl.drawElements( _gl.TRIANGLES, offsets[ i ].count, type, offsets[ i ].start * size );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment