Commit Graph

28 Commits

Author SHA1 Message Date
bjorn 6413a6eda2 Fix Model:getTriangles; Add Lua API; 2021-03-25 12:29:11 -06:00
bjorn e1195a92a0 lovrModelGetTriangles; 2021-03-25 12:29:11 -06:00
bjorn 72a54bce2f Support STL models;
Only binary STL files are supported right now, ASCII is more challenging.
2021-02-23 12:07:16 -07:00
bjorn fb1447503b Fix gcc warnings; 2021-02-19 23:44:23 -07:00
bjorn 023067ec27 util.h no longer uses atomics; 2021-02-11 16:37:55 -07:00
bjorn 8164e0b6e8 TextureData is now named Image!;
The existing Image construct was renamed StorageImage.
2021-02-08 20:17:47 -07:00
bjorn bc4cde1653 Adjust lovrRelease signature; 2021-02-08 17:52:26 -07:00
bjorn 3ded60948f rm core/ref; rm lovrAlloc; util does refcounting; 2021-02-08 17:26:44 -07:00
bjornbytes 80a33c0544 mat4_multiply -> mat4_mul;
quat_mul vs. mat4_multiply is inconsistent.  Going with mul over
multiply is consistent with vec3_sub and Lua's __mul metamethod.
2020-11-21 14:32:59 -07:00
bjorn 1185fcf6e1 Autodetect integer attribute types;
Fixes inability to use integer attributes with Mesh.
2020-05-21 00:31:49 -06:00
bjorn b0289de9a6 Error instead of crashing when skin has too many joints;
ModelData is still allowed to load skins with more joints, since
the limitation is in the graphics side of things (Model).

Eventually we will use a buffer for joints to alleviate this.
2020-05-02 14:14:29 -06:00
bjorn 443376efde ModelData: Use union for transform fields;
Nodes can have either a transform matrix, or decomposed transform
properties, but never both.  Using a union means we can store both
of those variants in the same piece of memory, using the existing
matrix boolean to figure out which one to use.

This reduces the size of the struct by 48 bytes (152 -> 104), which
ends up speeding up some model operations, I'm guessing due to the
CPU cache.
2020-02-11 16:38:31 -08:00
bjorn 403b217781 Fix Model destructor memory issues;
- Memory leaks.
- Freeing things that weren't allocated.
2019-09-20 13:46:27 -07:00
bjorn 2c29119e44 Fix non-interpolated cubic spline keyframe evaluation; 2019-09-19 23:01:50 -07:00
bjorn 4d3bfea67c Model:getMaterial(name|index); rm Model:setMaterial; 2019-08-09 16:10:46 -07:00
bjorn 7690db28af Windows: Fix all the int warnings; 2019-07-31 17:51:49 -07:00
bjorn 239a9514ea Model: Fix animations that aren't keyed at t=0; 2019-07-19 16:42:51 -07:00
bjorn 2eb4b779ab Model cleanup; 2019-07-11 20:13:47 -07:00
bjorn 4b4020d3a7 Model:pose; Model:getNodePose; 2019-07-11 20:09:46 -07:00
bjorn f81a65430b Add support for cubic spline keyframe interpolation; 2019-07-11 11:05:53 -07:00
bjorn 3c07ad6b0b Replace Animator with Model:animate; 2019-07-10 22:08:19 -07:00
bjorn 551dea8c86 Adjust includes; 2019-06-27 13:44:09 -07:00
bjorn fe21de403b lovrGraphicsDrawMesh; 2019-06-27 13:35:43 -07:00
bjorn d1f754d5f9 Fix Model memory leaks; 2019-06-03 08:13:42 -07:00
bjorn 22fe333150 Update refcounting (again);
- Ref struct only stores refcount now and is more general.
- Proxy stores a hash of its type name instead of an enum.
- Variants store additional information instead of using a vtable.
- Remove the concept of superclasses from the API.
- Clean up some miscellaneous includes.
2019-06-02 01:02:26 -07:00
bjorn 56f4c812ce Small intermediate fix for models without animators; 2019-05-26 21:12:07 -07:00
bjorn 4cc154fdfa More number conversions; 2019-05-20 20:35:07 -07:00
bjorn a17f10e273 Add modules folder; 2019-05-19 00:38:35 -07:00
Renamed from src/graphics/model.c (Browse further)