~eliasnaur/gio

5180bb0e1a50d5535f146c1d7129792125a179ed — Elias Naur 26 days ago af68e17
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>
1 files changed, 1 insertions(+), 1 deletions(-)

M gpu/gl/backend.go
M gpu/gl/backend.go => gpu/gl/backend.go +1 -1
@@ 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)