From 5180bb0e1a50d5535f146c1d7129792125a179ed Mon Sep 17 00:00:00 2001 From: Elias Naur Date: Fri, 13 Mar 2020 17:33:06 +0100 Subject: [PATCH] gpu/gl: don't panic if no input layout is bound Rendering will probably not be correct, but a panic is overreacting. Signed-off-by: Elias Naur --- gpu/gl/backend.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gpu/gl/backend.go b/gpu/gl/backend.go index e7fe7c3c..20c6f747 100644 --- a/gpu/gl/backend.go +++ b/gpu/gl/backend.go @@ -620,7 +620,7 @@ func (b *Backend) BindVertexBuffer(buf backend.Buffer, stride, offset int) { func (b *Backend) setupVertexArrays() { layout := b.state.layout if layout == nil { - panic("no input layout is current") + return } buf := b.state.buffer b.funcs.BindBuffer(ARRAY_BUFFER, buf.buf.obj)