I'm newbie in twgl.js. I want to know how to use extensions, especially instancing
does it makes a simple way for us or I must use pure webgl inside it?
To use instancing in twgl call set a divisor on your FullArraySpecs or AttribInfos If you created the WebGL context yourself call twgl.addExtensionsOnContext
It's suggested you use vertex array objects as twgl doesn't automatically reset the divisor for attributes where a divisor was previously set.
Instancing was added in v3.6.0.
To use instancing in twgl call set a
divisor
on yourFullArraySpec
s orAttribInfo
s If you created the WebGL context yourself calltwgl.addExtensionsOnContext
It's suggested you use vertex array objects as twgl doesn't automatically reset the divisor for attributes where a divisor was previously set.
Example: