bjorn
cb9f166234
Revert "Replace sprintf with stb version;"
...
This reverts commit 8f9d24c51f
.
2019-01-24 17:39:27 -08:00
bjorn
bf19fd5c15
Avoid more implicit float-double conversions;
2019-01-24 17:00:41 -08:00
bjorn
bda248b86e
Be more intentional about doubles vs. floats;
2019-01-24 16:48:06 -08:00
bjorn
eeecd65029
Update Curve error messages;
2019-01-20 20:40:40 -08:00
bjorn
8e0ccbf09a
Curve:split -> Curve:slice;
2019-01-20 20:36:42 -08:00
bjorn
8f9d24c51f
Replace sprintf with stb version;
2019-01-18 08:55:29 -08:00
bjorn
7338c82d7f
Add resizable vector pools;
...
It seems too dangerous/annoying to have pools error when they run
out of memory. Instead, we'll make it so you can choose to make
a pool resizable, where it enlarges its memory if it runs out. By
default Pools aren't resizable, but the default math pool is.
Also, reduce the size of the default pool from 640k to 4k.
2019-01-10 14:10:04 -08:00
bjorn
49b0aaa986
Pool allocation failures throw an error;
...
For now.
2019-01-05 00:11:23 -08:00
bjorn
ed71485fcc
Fix header vs. implementation pool function names;
2019-01-04 23:32:25 -08:00
bjorn
4f716499b0
Fix declspec for math functions;
...
LuaJIT can't find math functions on windows unless they are exported.
2019-01-04 02:18:21 -08:00
bjorn
086f7f4e47
lovrRelease frees objects instead of destructor;
...
That way objects allocated on the stack can be destroyed.
2018-12-19 01:41:01 -08:00
bjorn
9803e9916f
Use naming convention for destructor;
2018-12-19 01:04:42 -08:00
bjorn
155a0c1449
lovr*Create -> lovr*Init; lovr*Create macro;
2018-12-19 01:04:42 -08:00
bjorn
2aadc9bde1
rm Transform;
2018-12-02 12:08:07 -08:00
bjorn
ba192374dc
Start math types;
2018-12-02 12:08:07 -08:00
bjorn
0e99d47394
Fix module destruction;
...
There is a problem when a Thread stops: it destroys all of the modules
that it required. This is because we unconditionally call luax_atexit
when modules are required, and when the thread lua_State dies it takes
all of the modules with it. To fix this, lovr<Module>Init will return
whether or not initialization successfully happened, which provides us
with enough info to know if we should place the luax_atexit destructor
2018-11-19 09:24:28 -08:00
bjorn
005d4b93f2
Move math helpers into lib;
...
They aren't really part of the math module since they are shared
across several modules, more "util"-y.
2018-11-15 08:03:51 -08:00
bjorn
76c2dc757a
Curve:getTangent;
2018-11-08 12:56:45 -08:00
bjorn
2acf49fb34
Curve;
2018-11-08 12:56:45 -08:00
bjorn
9010af3ea4
lovrRandomGeneratorGetState: Improve correctness;
2018-10-24 09:50:00 -07:00
bjorn
518d26aad8
getDisplayDimensions: Use unsigned ints;
...
Fixes a warning.
2018-10-21 08:40:57 -07:00
bjorn
28c56f959d
Use MAT4_IDENTITY macro;
2018-10-06 21:58:40 -07:00
bjorn
7829f3f75f
mat4_multiply: SSE
...
~2.5x
2018-10-06 21:42:52 -07:00
bjorn
0b2a39fb03
Return original matrix in mat4_invertPose;
2018-10-06 21:26:17 -07:00
bjorn
4279cf086f
mat4_invertPose;
...
~3.9x
2018-10-06 21:21:25 -07:00
bjorn
11e6580717
mat4_transpose: Use SSE intrinsics;
...
~1.6x
2018-10-06 20:04:39 -07:00
bjorn
7354465e12
Add LOVR_USE_SSE;
2018-10-06 20:03:48 -07:00
bjorn
ba68c0c127
Add mat4_getPose helper;
2018-10-06 16:54:41 -07:00
bjorn
816fda2177
Fix everything and merge;
2018-09-27 18:38:44 -07:00
bjorn
bc2d638b00
Refs know their type;
2018-07-24 19:14:29 -07:00
bjorn
fedab9e46f
lovr.math.noise;
2018-07-06 18:39:34 -07:00
bjorn
94c432b4b4
rm length parameter from lovrRandomGeneratorSetState;
2018-07-04 14:07:48 -07:00
bjorn
57c8dfe146
Clean up includes;
2018-07-04 13:51:35 -07:00
bjorn
ab2594b204
WebVR velocity functions;
2018-05-27 19:05:10 -07:00
bjorn
a3e4b9b2b3
Change mat4_transform signature;
2018-05-27 19:05:10 -07:00
bjorn
2a861b484d
Fix edge case in quaternion slerp;
2018-02-28 20:32:28 -08:00
bjorn
4df836727c
Simplify refcounting;
2018-02-26 00:59:03 -08:00
bjorn
f54d1c1e03
rm containerof;
2018-02-25 23:19:39 -08:00
bjorn
8fb3421658
Fix everything on windows;
2018-02-23 18:38:53 -08:00
bjorn
f5fa9a4e5c
Make modules more restartable;
...
Except headset. Screw you, headset.
2018-02-23 18:38:53 -08:00
bjorn
ece5bf2f9c
Node and material accessors for ModelData;
2018-02-11 13:03:52 -08:00
mcc
8052896b33
Restart-without-quit support: lovr.event.quit("restart") and return-from-run() both support the string "restart" in place of an exit code. When this happens, the program reruns itself in a new, isolated environment. In Emscripten, no reboot occurs and the program only quits.
2018-01-25 21:32:16 -05:00
bjorn
ef0ba9124d
lovr.math.gammaToLinear; lovr.math.linearToGamma;
2017-11-24 00:53:08 -08:00
bjorn
855ffb9e34
Add vec3_lerp;
2017-11-06 17:11:40 -08:00
bjorn
f5275934b6
Add quat_slerp;
2017-11-05 13:57:52 -08:00
bjorn
ecde864ec4
Use spooky BOOleans everywhere;
2017-10-31 01:14:09 -07:00
bjorn
b3d921d0ed
Fix build;
2017-09-22 22:26:31 -07:00
bjorn
27c914664c
Clean up includes;
2017-09-19 23:49:10 -07:00
bjorn
80e3d3487a
Transform:getMatrix; Transform:setMatrix;
2017-09-10 14:55:24 -07:00
bjorn
447b2da41a
lovr.math.orientationToDirection;
2017-09-02 17:26:24 -07:00