getBindingState method
Implementation
getBindingState(
BufferGeometry geometry,
program,
Material material,
) {
var wireframe = (material.wireframe == true);
var programMap = bindingStates[geometry.id];
if (programMap == null) {
programMap = {};
bindingStates[geometry.id] = programMap;
}
var stateMap = programMap[program.id];
if (stateMap == null) {
stateMap = {};
programMap[program.id] = stateMap;
}
var state = stateMap[wireframe];
if (state == null) {
state = createBindingState(createVertexArrayObject());
stateMap[wireframe] = state;
}
return state;
}