How to release WebGL Resources ?
Please consider an application for walking thru two large buildings, linked by a door.
Whenever the camera crosses the inter-connection door, I want to release most (all?) WebGL resources (shaders, buffers, textures, etc) allocated for the previous building so that I can setup new WebGL resources for the new building.
Am I supposed to carefully keep track of all WebGL resources in order to release them explicitely?
Otherwise, is there an easier way to release all WebGL resources? (Other than reloading the whole HTML page.)
So far, my best guess is to call resetToInitialState(gl) from webgl-debug.js: