|
if (this.gl.renderer.currentGeometry !== `${this.id}_${program.attributeOrder}`) { |
When we bind VAO or unbind it we should and change renderer.currentGeometry, this is IMPORTANT because some code call only bindVertexArray.
See:
https://github.com/oframe/ogl/blob/master/src/extras/GLTFLoader.js#L92
Because we have a VAO Abstraction, why we can't store it in renderer.currentGeometry inside renderer?
This is more strictly that store string literal.
Then need move currentGeometry to state.
ogl/src/core/Geometry.js
Line 170 in fceff3a
When we bind VAO or unbind it we should and change
renderer.currentGeometry, this is IMPORTANT because some code call only bindVertexArray.See:
https://github.com/oframe/ogl/blob/master/src/extras/GLTFLoader.js#L92
Because we have a VAO Abstraction, why we can't store it in
renderer.currentGeometryinside renderer?This is more strictly that store string literal.
Then need move currentGeometry to state.