]> git.tdb.fi Git - libs/gl.git/commit
Do an early return from Mesh::draw if there's no data
authorMikko Rasa <tdb@tdb.fi>
Sat, 3 Apr 2021 18:55:58 +0000 (21:55 +0300)
committerMikko Rasa <tdb@tdb.fi>
Sat, 3 Apr 2021 18:55:58 +0000 (21:55 +0300)
commitdb349c75a9563d38afaf1a8a602d9ee1155d62bb
treebae705dedb76a03afb7940e05ff4ee006587a0d6
parent0375be1a27f8852ed8ca422db78bf6380d2b11b1
Do an early return from Mesh::draw if there's no data

Otherwise if would try to set zero-sized storage for the buffers, which
is not allowed.

Also guard against empty batches in resize_buffers just in case.
source/core/mesh.cpp