From a50ef46ed051bb713780b9b2888d2c16dafd9086 Mon Sep 17 00:00:00 2001 From: Hajime Hoshi Date: Fri, 31 Jul 2020 02:01:38 +0900 Subject: [PATCH] graphicsdriver/opengl: Do not allow nil value for uniform variables --- internal/graphicsdriver/opengl/program.go | 2 -- 1 file changed, 2 deletions(-) diff --git a/internal/graphicsdriver/opengl/program.go b/internal/graphicsdriver/opengl/program.go index e271314d0..9418979a8 100644 --- a/internal/graphicsdriver/opengl/program.go +++ b/internal/graphicsdriver/opengl/program.go @@ -264,8 +264,6 @@ func (g *Graphics) useProgram(program program, uniforms []uniformVariable, textu for _, u := range uniforms { switch v := u.value.(type) { - case nil: - // Do nothing. case float32: if got, expected := (&shaderir.Type{Main: shaderir.Float}), &u.typ; !got.Equal(expected) { return fmt.Errorf("opengl: uniform variable type doesn't match: expected %s but %s", expected.String(), got.String())