Commit Graph

849 Commits

Author SHA1 Message Date
bjorn ee27af1a85 graphics: forward declarations; 2019-04-05 04:59:14 -07:00
bjorn 9e7b9642de data: forward declarations; 2019-04-05 04:27:48 -07:00
bjorn 14cab6cd3c Move utf helper into lib; 2019-04-05 04:04:52 -07:00
bjorn d31dca5520 Free objects in their destructors; 2019-04-05 03:56:10 -07:00
bjorn 6fdeda9e61 Make lovrRelease non-generic;
We know what type we're releasing 99% of the time, we don't need to
play a guessing game in lovrRelease, just have the caller say which
destructor to use.

There is lovrGenericRelease for situations where we need it, which
does the slower lookup of the destructor.
2019-04-05 03:41:03 -07:00
bjorn 64b7ee85f7 Fix rendering with vertexCount of 0; 2019-04-05 01:28:17 -07:00
bjorn c2c4322e3b Add drawMode to lovrModelDraw Batch; 2019-04-05 01:23:48 -07:00
bjorn a28b333899 Split draw data stream into two streams;
Also the max number of draws can be hardcoded to 256 now.
2019-04-05 00:49:50 -07:00
bjorn 88b54a7ab9 Make cursors generic; 2019-04-05 00:49:50 -07:00
bjorn efbc88073e Write vertices at batch time; 2019-04-05 00:49:50 -07:00
bjorn 10305a4fed Fix batching problem; 2019-03-25 11:36:29 +09:00
bjorn 85c51399a6 Fix MSVC warnings; 2019-03-17 00:58:13 -07:00
bjorn 9744d95039 Fix snprintf warning;
There's a potential string truncation here if you have a uniform array with a really long name.
2019-03-16 19:43:04 -07:00
bjorn 7441456aab Rename lovr.graphics.getSupported and getSystemLimits;
"Features" and "Limits" will be the standard terminology used now.
2019-03-14 21:24:25 -07:00
bjorn 25fe88b493 Limit UBO size in WebGL;
Currently glBindBufferRange does not seem to work properly if the
offset is bigger than the maximum size of a uniform buffer.  The
size of the draw data buffer is being limited as a workaround.
2019-03-14 13:40:19 -07:00
bjorn 8722b6e296 Improve Canvas attachment errors; 2019-03-13 09:35:28 -07:00
bjorn c1705da8b7 Improve shader compilation error; 2019-03-13 09:31:06 -07:00
bjorn e008ea7a28 Consistency; 2019-03-13 09:21:14 -07:00
bjorn ce20447260 Use proper ifdefs for LOVR_WEBGL; 2019-03-12 13:18:14 -07:00
bjorn a14e15f856 Only fence when needed;
There appears to be some sort of problem where syncing on WASM and
Android leads to dropped frames.  The only sync that causes this
problem is the delayed sync that occurs after rolling over a
buffer -- in that case the sync is often placed one frame late
once we realize that the rollover has occurred.  I'm not sure if
this is a driver quirk or an improper use of glFenceSync but for
right now avoiding the fence on the problematic platforms fixes
the immediate issue.
2019-03-12 13:09:21 -07:00
bjorn 90d6e2b407 Make binding functions static; 2019-02-17 14:52:22 -08:00
bjorn e05b835927 Fix prototypes; 2019-02-17 14:39:51 -08:00
bjorn d529620fea rm unused variables; 2019-02-17 14:19:39 -08:00
bjorn 581d1d7a74 Fix warnings; 2019-02-16 23:43:20 -08:00
bjorn e80e806b9d Always flush ShaderBlocks; 2019-02-14 10:20:19 -08:00
bjorn 241abb5b2b Explicitly set generic int attribute for WebGL; 2019-02-14 10:11:10 -08:00
bjorn 1d3b05a515 Make bone IDs unsigned for WebGL; 2019-02-14 09:49:31 -08:00
bjorn 912dec3c78 Reduce clientWiatSync timeout for WebGL; 2019-02-14 09:43:49 -08:00
bjorn 69b6e599e9 Re-add Model:getMaterial and Model:setMaterial; 2019-02-13 23:55:47 -08:00
bjorn b9b719e862 Fix gamma correct issue with built-in Camera; 2019-02-13 21:14:45 -08:00
bjorn be58911276 Fix several Mesh problems; 2019-02-13 17:20:43 -08:00
bjorn a02d4eb659 rm VertexData; 2019-02-13 15:10:52 -08:00
bjorn 4373e29bea OBJ groups/materials; 2019-02-13 15:10:52 -08:00
bjorn 9136c7e3c1 Model:getAABB;
It takes animated node transforms into account!  But not skinning.
2019-02-13 15:10:52 -08:00
bjorn a24d7e5447 Bugfixes during testing; 2019-02-13 15:10:52 -08:00
bjorn 9deab224da Handle scene root properly; 2019-02-13 15:10:52 -08:00
bjorn db391a7d68 Make cubic spline error more polite; 2019-02-13 15:10:52 -08:00
bjorn 3911c9d7c8 Support animation names; 2019-02-13 15:10:52 -08:00
bjorn d25f59582e Handle missing textures better; 2019-02-13 15:10:52 -08:00
bjorn 2338e0ceb1 Change animator iteration; 2019-02-13 15:10:52 -08:00
bjorn bea2140676 Animation optimization; Cleanup; 2019-02-13 15:10:52 -08:00
bjorn 09936a8ae2 Load animation names; General testing; 2019-02-13 15:10:52 -08:00
bjorn a8566e2c7c Load materials; 2019-02-13 15:10:52 -08:00
bjorn 540b6a60e0 Refactoring; 2019-02-13 15:10:52 -08:00
bjorn 6bb569192f Make sure bone indices are ints; 2019-02-13 15:10:52 -08:00
bjorn 0a4344577e Skinning work; Bugfixes; 2019-02-13 15:10:52 -08:00
bjorn 70dc871f88 More work on Animator; 2019-02-13 15:10:52 -08:00
bjorn 40b8b8da7c Fix primitive restart overflow for u32 indices; 2019-02-13 15:10:52 -08:00
bjorn d14af4a79c Fix traversal; 2019-02-13 15:10:52 -08:00
bjorn 80b584aeb5 Compute global transforms better; 2019-02-13 15:10:52 -08:00