src/programs.js
function bindTransformFeedbackInfo(gl, transformFeedbackInfo, bufferInfo) {
  if (transformFeedbackInfo.transformFeedbackInfo) {
    transformFeedbackInfo = transformFeedbackInfo.transformFeedbackInfo;
  }
  if (bufferInfo.attribs) {
    bufferInfo = bufferInfo.attribs;
  }
  for (const name in bufferInfo) {
    const varying = transformFeedbackInfo[name];
    if (varying) {
      const buf = bufferInfo[name];
      if (buf.offset) {
        gl.bindBufferRange(gl.TRANSFORM_FEEDBACK_BUFFER, varying.index, buf.buffer, buf.offset, buf.size);
      } else {
        gl.bindBufferBase(gl.TRANSFORM_FEEDBACK_BUFFER, varying.index, buf.buffer);
      }
    }
  }
}
function bindTransformFeedbackInfo(gl, transformFeedbackInfo, bufferInfo) {
  if (transformFeedbackInfo.transformFeedbackInfo) {
    transformFeedbackInfo = transformFeedbackInfo.transformFeedbackInfo;
  }
  if (bufferInfo.attribs) {
    bufferInfo = bufferInfo.attribs;
  }
  for (const name in bufferInfo) {
    const varying = transformFeedbackInfo[name];
    if (varying) {
      const buf = bufferInfo[name];
      if (buf.offset) {
        gl.bindBufferRange(gl.TRANSFORM_FEEDBACK_BUFFER, varying.index, buf.buffer, buf.offset, buf.size);
      } else {
        gl.bindBufferBase(gl.TRANSFORM_FEEDBACK_BUFFER, varying.index, buf.buffer);
      }
    }
  }
}
function bindTransformFeedbackInfo ( gl , transformFeedbackInfo , bufferInfo ) { if ( transformFeedbackInfo . transformFeedbackInfo ) { transformFeedbackInfo = transformFeedbackInfo . transformFeedbackInfo ; } if ( bufferInfo . attribs ) { bufferInfo = bufferInfo . attribs ; } for ( const name in bufferInfo ) { const varying = transformFeedbackInfo [ name ] ; if ( varying ) { const buf = bufferInfo [ name ] ; if ( buf . offset ) { gl . bindBufferRange ( gl . TRANSFORM_FEEDBACK_BUFFER , varying . index , buf . buffer , buf . offset , buf . size ) ; } else { gl . bindBufferBase ( gl . TRANSFORM_FEEDBACK_BUFFER , varying . index , buf . buffer ) ; } } } }
Binds buffers for transform feedback.

@param {WebGLRenderingContext} gl The WebGLRenderingContext to use.
@param {(module:twgl.ProgramInfo|Object<string, module:twgl.TransformFeedbackInfo>)} transformFeedbackInfo A ProgramInfo or TransformFeedbackInfo.
@param {(module:twgl.BufferInfo|Object<string, module:twgl.AttribInfo>)} [bufferInfo] A BufferInfo or set of AttribInfos.
@memberOf module:twgl
Binds buffers for transform feedback .