MCPcopy Create free account
hub / github.com/heygen-com/hyperframes / createFramebuffer

Function createFramebuffer

packages/shader-transitions/src/hyper-shader.ts:525–532  ·  view source on GitHub ↗
(gl: WebGLRenderingContext, tex: WebGLTexture)

Source from the content-addressed store, hash-verified

523}
524
525function createFramebuffer(gl: WebGLRenderingContext, tex: WebGLTexture): WebGLFramebuffer {
526 const fbo = gl.createFramebuffer();
527 if (!fbo) throw new Error("[HyperShader] Failed to create framebuffer");
528 gl.bindFramebuffer(gl.FRAMEBUFFER, fbo);
529 gl.framebufferTexture2D(gl.FRAMEBUFFER, gl.COLOR_ATTACHMENT0, gl.TEXTURE_2D, tex, 0);
530 gl.bindFramebuffer(gl.FRAMEBUFFER, null);
531 return fbo;
532}
533
534function createSnapshotLoadingOverlay(
535 root: HTMLElement | null,

Callers 1

initFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected