MCPcopy Create free account
hub / github.com/DavidHDev/react-bits / compileShader

Function compileShader

src/content/Animations/SplashCursor/SplashCursor.jsx:208–215  ·  view source on GitHub ↗
(type, source, keywords)

Source from the content-addressed store, hash-verified

206 }
207
208 function compileShader(type, source, keywords) {
209 source = addKeywords(source, keywords);
210 const shader = gl.createShader(type);
211 gl.shaderSource(shader, source);
212 gl.compileShader(shader);
213 if (!gl.getShaderParameter(shader, gl.COMPILE_STATUS)) console.trace(gl.getShaderInfoLog(shader));
214 return shader;
215 }
216
217 function addKeywords(source, keywords) {
218 if (!keywords) return source;

Callers 2

setKeywordsMethod · 0.70
SplashCursorFunction · 0.70

Calls 2

addKeywordsFunction · 0.70
createShaderMethod · 0.45

Tested by

no test coverage detected