natevm / BSDF-Visualizer

Project for scientific visualization
MIT License
18 stars 4 forks source link

Calling gl.bindBuffer in the wrong place for two different LobeRenderer objects for some reason causes breakage #47

Closed n8xm closed 6 years ago

n8xm commented 6 years ago

On the lobeRdr_bug branch, see commit e5387a4015391cef7ba02d61294923684b95a16b.

If we click and drag across the teapot, lobe glitches out. However, if we uncomment line 988 of ModelViewport.js, then it works.

More specifically, calling gl.bindBuffer on line 253 of LobeRenderer.js causes the breakage.

I'm not sure why this is happening because both lobes are in completely separate OpenGL contexts and therefore one does not write to the data or state of the other.

n8xm commented 6 years ago

Closing because this isn't quite the actual issue. It happens with a single instance of LobeRenderer in the ModelViewport.