This is quite a big change, Model struct has been redesigned to support multiple meshes and multiple materials, most 3d fileformats contain multiple meshes and reference multiple materials.
Consequently, multiple functions have been reviewed.
LoadOBJ(), LoadIQM(), LoadGLFT() now return a Model.
Current LoadOBJ() is not valid anymore, actually, tinyobj_loader_c library is considered for replacement.
If we have no data to update/draw, we avoid update/draw. On `DrawBuffersDefault()` if no vertes data is available nothing is drawn but some globals: vertexData, projection, modelview, draws... are reseted.
There shouldn't be any problem if we don't touch those globals in case no vertex have been processed but, just in case, I warn about it.
Based on pull request from user "DarkElvenAngel", better integrated with the current event system and enhanced with buffer to help with fast typing at low framerates.
When drawing LINES or TRIANGLES, vertex are accumulated in same buffer as QUADS and new draw calls are registered but QUADS drawing uses an index buffer for optimization, so, when adding LINES/TRIANGLES vertices we need to make sure next draw calls for QUADS keep aligned with indices buffer.
To get that we just add some alignment vertex at the end of the LINES/TRIANGLES draw calls, to make them multiple of 4 vertex.
The idea is supporting additional raygui and physac modules building with raylib but those modules are distributed as header-only libraries and it makes a bit dificult to build them inside raylib...