{"record":{"id":"3f86a8ca0d7c5840","repo":"mrdoob/three.js","slug":"three-webglrenderer-webgl-1-is-not-supported-sinc","errorCode":null,"errorMessage":"THREE.WebGLRenderer: WebGL 1 is not supported since r163.","messagePattern":"THREE\\.WebGLRenderer: WebGL 1 is not supported since r163\\.","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"critical","filePath":"src/renderers/WebGLRenderer.js","lineNumber":102,"sourceCode":"\t\t\toutputBufferType = UnsignedByteType,\n\t\t} = parameters;\n\n\t\t/**\n\t\t * This flag can be used for type testing.\n\t\t *\n\t\t * @type {boolean}\n\t\t * @readonly\n\t\t * @default true\n\t\t */\n\t\tthis.isWebGLRenderer = true;\n\n\t\tlet _alpha;\n\n\t\tif ( context !== null ) {\n\n\t\t\tif ( typeof WebGLRenderingContext !== 'undefined' && context instanceof WebGLRenderingContext ) {\n\n\t\t\t\tthrow new Error( 'THREE.WebGLRenderer: WebGL 1 is not supported since r163.' );\n\n\t\t\t}\n\n\t\t\t_alpha = context.getContextAttributes().alpha;\n\n\t\t} else {\n\n\t\t\t_alpha = alpha;\n\n\t\t}\n\n\t\tconst _outputBufferType = outputBufferType;\n\n\t\tconst INTEGER_FORMATS = new Set( [\n\t\t\tRGBAIntegerFormat,\n\t\t\tRGIntegerFormat,\n\t\t\tRedIntegerFormat\n\t\t] );","sourceCodeStart":84,"sourceCodeEnd":120,"githubUrl":"https://github.com/mrdoob/three.js/blob/da05705fa31f02710c19772a2aa70c7454807f0c/src/renderers/WebGLRenderer.js#L84-L120","documentation":"Thrown by the WebGLRenderer constructor when a context is explicitly passed that is a WebGLRenderingContext (WebGL 1). Since three.js r163, WebGL 1 is no longer supported; the renderer only accepts a WebGL2RenderingContext. Passing a WebGL1 context is a hard failure.","triggerScenarios":"Constructing new THREE.WebGLRenderer({ canvas, context }) where context was obtained via canvas.getContext('webgl') or 'experimental-webgl'. Migrating from a pre-r163 codebase that requested a WebGL1 context.","commonSituations":"Upgrading three.js past r163 without updating context acquisition code; copy-pasted legacy code that still requests 'webgl'; libraries/wrappers that hand three.js a WebGL1 context; browsers/environments where only WebGL1 was previously requested explicitly.","solutions":["Stop passing an explicit context and let three.js acquire WebGL2 itself, OR request 'webgl2' explicitly: canvas.getContext('webgl2', attrs).","Upgrade to r163+ and remove any 'webgl' / 'experimental-webgl' context acquisition.","Detect WebGL2 support (canvas.getContext('webgl2')) before constructing the renderer and show a fallback message if unavailable.","Audit third-party integrations that inject a context into the renderer constructor."],"exampleFix":"// before\nconst ctx = canvas.getContext( 'webgl' );\nconst renderer = new THREE.WebGLRenderer( { canvas, context: ctx } ); // throws\n\n// after\nconst renderer = new THREE.WebGLRenderer( { canvas, antialias: true } ); // let three.js pick webgl2","handlingStrategy":"validation","validationCode":"// Do not pass a WebGL1 context. Probe for WebGL2 first.\nfunction getRenderer( canvas ) {\n  if ( canvas.getContext( 'webgl2' ) === null ) {\n    throw new Error( 'WebGL2 is required by this build of three.js.' );\n  }\n  return new THREE.WebGLRenderer( { canvas } ); // let three.js acquire webgl2\n}","typeGuard":"function isWebGL2Context( ctx ) {\n  return typeof WebGL2RenderingContext !== 'undefined' && ctx instanceof WebGL2RenderingContext;\n}","tryCatchPattern":null,"preventionTips":["Stop passing an explicit context to WebGLRenderer; let it acquire WebGL2.","Never call canvas.getContext('webgl') or 'experimental-webgl' on r163+.","Audit third-party wrappers that inject a context into the constructor.","Detect WebGL2 availability before constructing the renderer."],"tags":["webglrenderer","webgl1","version-migration","r163"],"backgroundTag":null,"analyzedSha":"da05705fa31f02710c19772a2aa70c7454807f0c","analyzedAt":"2026-08-12T22:51:37.160Z","schemaVersion":2},"datasetVersion":"2026-08-12T23:17:12.415Z"}