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

Function createProgram

packages/shader-transitions/src/webgl.ts:55–60  ·  view source on GitHub ↗
(gl: WebGLRenderingContext, fragSrc: string)

Source from the content-addressed store, hash-verified

53}
54
55export function createProgram(gl: WebGLRenderingContext, fragSrc: string): WebGLProgram {
56 if (!cachedVertexShader) {
57 cachedVertexShader = compileShader(gl, vertSrc, gl.VERTEX_SHADER);
58 }
59 return linkProgram(gl, cachedVertexShader, fragSrc);
60}
61
62export function createProgramWithVertex(
63 gl: WebGLRenderingContext,

Callers 2

initFunction · 0.70

Calls 2

linkProgramFunction · 0.85
compileShaderFunction · 0.70

Tested by

no test coverage detected