mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-12-24 18:58:54 +01:00
graphicsdriver/opengl: Do not allow nil value for uniform variables
This commit is contained in:
parent
da5642cd0e
commit
a50ef46ed0
@ -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())
|
||||
|
Loading…
Reference in New Issue
Block a user