compileShader()
ts
function compileShader(
gl,
source,
type
): WebGLShader;Defined in: compileShader.js:24
Compiles a shader. On failure throws an error naming the shader type, with the compiler log and the source lines it points at.
Parameters
| Parameter | Type | Description |
|---|---|---|
gl | WebGL2RenderingContext | The WebGL2 context. |
source | string | GLSL ES 3.00 source. |
type | number | gl.VERTEX_SHADER or gl.FRAGMENT_SHADER. |
Returns
WebGLShader