How to use the WebGLFramebuffer function from bindings

Find comprehensive JavaScript bindings.WebGLFramebuffer code examples handpicked from public code repositorys.

223
224
225
226
227
228
229
230
231
232
233
var _createFramebuffer = gl.createFramebuffer;
gl.createFramebuffer = function () {
  if (!(arguments.length === 0)) {
    throw new TypeError('Expected createFramebuffer()');
  }
  return new gl.WebGLFramebuffer(_createFramebuffer());
}


var _createProgram = gl.createProgram;
gl.createProgram = function createProgram() {
fork icon264
star icon386
watch icon0

+ 81 other calls in file

684
685
686
687
688
689
690
691
692
693
const result = _getParameter(pname)
if(specialParametersSet.has(pname)){
  if(pname === specialParameters.texture2d || pname === specialParameters.texture2dArray){
    return new gl.WebGLTexture(result)
  }else if(pname === specialParameters.framebuffer || pname === specialParameters.drawFramebuffer || pname === specialParameters.readFramebuffer){
    return new gl.WebGLFramebuffer(result)
  }else if(bufferParams.has(pname)){
    return new gl.WebGLBuffer(result)
  }
  throw new Error('TODO: wrap parameter value')
fork icon0
star icon0
watch icon0

+ 275 other calls in file

Other functions in bindings

Sorted by popularity

function icon

bindings.createKey is the most popular function in bindings (8616 examples)