MCPcopy
hub / github.com/dli/paint / buildShader

Function buildShader

wrappedgl.js:1142–1152  ·  view source on GitHub ↗
(gl, type, source)

Source from the content-addressed store, hash-verified

1140 };
1141
1142 function buildShader (gl, type, source) {
1143 var shader = gl.createShader(type);
1144 gl.shaderSource(shader, source);
1145 gl.compileShader(shader);
1146
1147 //log any errors
1148 if (!gl.getShaderParameter(shader, gl.COMPILE_STATUS)) {
1149 console.log(gl.getShaderInfoLog(shader));
1150 }
1151 return shader;
1152 };
1153
1154 //we don't have to specify any or all attribute location bindings
1155 //any unspecified bindings will be assigned automatically and can be queried with program.getAttribLocation(attributeName)

Callers 1

WrappedProgramFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…