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 <mail@eliasnaur.com>
This commit is contained in:
Elias Naur
2020-03-13 17:33:06 +01:00
parent af68e17dd3
commit 5180bb0e1a
+1 -1
View File
@@ -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)