bjorn
e47f3eb108
Use doubles for noise;
2022-03-27 14:51:06 -07:00
bjorn
f347ac98d9
Switch to simplex noise;
...
Pending test
2022-03-27 01:21:52 -07:00
bjorn
dc6de4ca14
Freeze! GCC police;
2022-03-25 12:15:38 -07:00
bjorn
2da18d419b
mv util src;
2022-03-22 00:13:38 -07:00
bjorn
dc11e048a2
LOVR_RESTRICT -> restrict;
2022-03-21 00:22:25 -07:00
bjorn
17c05b1760
Merge branch 'master' into dev
2022-03-14 14:10:25 -07:00
bjorn
c9fe026a66
Fix undefined behavior in arr_free;
...
Currently there is a single allocator function used in arr_t. Its
behavior depends on the values for the pointer and size arguments:
- If pointer is NULL, it should allocate new memory.
- If pointer is non-NULL and size is positive, it should resize memory.
- If size is zero, it should free memory.
All instances of arr_t use realloc for this right now. The problem
is that realloc's behavior is undefined when the size argument is zero.
On Windows and Linux, realloc will free the pointer, but on macOS this
isn't the case. This means that arr_t leaks memory on macOS.
It's best to not rely on undefined behavior like this, so let's instead
use a helper function that behaves the way we want.
2022-03-14 12:27:58 -07:00
bjorn
159243190b
rm some unnecessary includes;
2021-04-20 20:08:30 -06:00
bjorn
023067ec27
util.h no longer uses atomics;
2021-02-11 16:37:55 -07:00
bjorn
8c714c45b0
Clean up some includes;
2021-02-08 11:16:00 -07:00
bjorn
6d92d54079
Try having arr_t in util;
2021-02-08 18:25:05 -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
bjorn
6cf74a976d
Spacing;
2020-12-25 12:51:18 -07:00
bjorn
d81a822bbc
rm dead lovrMathOrientationToDirection declaration;
2020-12-25 12:50:50 -07:00
bjorn
b8598dfe64
Optimize Curve:render;
...
No longer does dynamic memory allocation and sets the initial table
size properly to avoid reallocs.
2020-08-28 03:57:39 -06:00
bjorn
2f9400a5f7
Adjust includes;
2019-12-10 13:01:28 -08:00
bjorn
bfd63e3515
Use restrict modifier in curve evaluation;
...
Allows compiler to emit SIMD, way smaller/faster.
2019-12-05 13:39:04 -08:00
bjorn
1030c01a35
Stop aligning pool memory;
...
It isn't necessary anymore since we aren't hiding data in the alignment
bits and it seems to be causing problems in wasm.
2019-11-28 15:59:04 -08:00
bjorn
79b5d2962c
Fix problem with vector lightuserdata handles;
2019-08-31 03:08:42 -07:00
bjorn
28344928c9
Simplify arr;
2019-08-21 23:16:58 -07:00
bjorn
584261e21f
rm ffi vectors;
2019-08-19 14:13:36 -07:00
bjorn
7690db28af
Windows: Fix all the int warnings;
2019-07-31 17:51:49 -07:00
bjorn
f564444641
Fix some WebGL issues;
2019-07-28 17:28:18 -07:00
bjorn
122143b13a
vec4;
2019-07-16 20:30:51 -07:00
bjorn
9156fa2cbf
Vector rework;
2019-07-16 20:30:51 -07:00
bjorn
8e2775ef6d
Math: cleanup;
2019-07-11 11:35:50 -07:00
bjorn
8c76e6f19b
RandomGenerator: cleanup;
2019-07-11 11:24:34 -07:00
bjorn
1f8a7e073f
Curve: cleanup;
2019-07-11 11:22:03 -07:00
bjorn
879c789a08
Polyfill M_PI;
...
It technically isn't part of C, which is causing problems on some systems.
2019-06-20 21:43:40 -07:00
bjorn
eb1e257209
Add new array implementation; Upgrade filesystem;
...
Filesystem:
- Uses streaming file IO.
- Uses less memory when requiring files.
- Simplifies its require path implementation.
2019-06-16 13:30:30 -07:00
bjorn
0c75f40793
rm the other restrict;
...
I guess it just isn't portable.
2019-06-04 04:43:02 -07:00
bjorn
feae7bdf3a
rm extra restrict qualifier;
...
Maybe this is confusing MSVC. Doesn't appear to impact codegen.
2019-06-04 04:20:23 -07:00
bjorn
06c6b172de
vec3 has 4 elements;
2019-06-03 07:20:03 -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
df6b7fc96a
Ref is mostly private now;
...
It's really nice how objects don't need to care about how they're
allocated/managed now.
2019-05-20 15:09:06 -07:00
bjorn
7645f4c014
Add core folder;
2019-05-20 02:47:33 -07:00
bjorn
a17f10e273
Add modules folder;
2019-05-19 00:38:35 -07:00