From 0ff83829baa94820172d3e5a658ddefe47c3ae63 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=81=BE=E3=81=A3=E3=81=A1=E3=82=83=E3=81=A8=E3=83=BC?= =?UTF-8?q?=E3=81=AB=E3=82=85?= <17376330+u1-liquid@users.noreply.github.com> Date: Tue, 7 Nov 2023 22:51:46 +0900 Subject: [PATCH] =?UTF-8?q?enhance(frontend):=20=E3=82=B7=E3=82=A7?= =?UTF-8?q?=E3=83=BC=E3=83=80=E3=83=BC=E3=82=B3=E3=83=B3=E3=83=91=E3=82=A4?= =?UTF-8?q?=E3=83=AB=E3=81=AB=E5=A4=B1=E6=95=97=E3=81=97=E3=81=9F=E5=A0=B4?= =?UTF-8?q?=E5=90=88=E8=A9=B3=E7=B4=B0=E3=81=AA=E3=82=A8=E3=83=A9=E3=83=BC?= =?UTF-8?q?=E5=86=85=E5=AE=B9=E3=82=92=E5=87=BA=E5=8A=9B=E3=81=A7=E3=81=8D?= =?UTF-8?q?=E3=82=8B=E3=82=88=E3=81=86=E3=81=AB=20(MisskeyIO#221)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/frontend/src/components/MkAnimBg.vue | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/packages/frontend/src/components/MkAnimBg.vue b/packages/frontend/src/components/MkAnimBg.vue index 70d101a9d3..6bda74a811 100644 --- a/packages/frontend/src/components/MkAnimBg.vue +++ b/packages/frontend/src/components/MkAnimBg.vue @@ -24,8 +24,16 @@ const props = withDefaults(defineProps<{ function loadShader(gl, type, source) { const shader = gl.createShader(type); - gl.shaderSource(shader, source); - gl.compileShader(shader); + try { + gl.shaderSource(shader, source); + gl.compileShader(shader); + } catch (error) { + alert( + `failed to compile shader: ${error} ${gl.getShaderInfoLog(shader)}`, + ); + gl.deleteShader(shader); + return null; + } if (!gl.getShaderParameter(shader, gl.COMPILE_STATUS)) { alert(