1
0
Fork 0
mirror of https://github.com/bjornbytes/lovr.git synced 2024-07-04 13:33:34 +00:00
Commit graph

234 commits

Author SHA1 Message Date
bjorn 62fe520da1 maf: Fix quat_getDirection; 2019-07-16 23:03:37 -07:00
bjorn 9156fa2cbf Vector rework; 2019-07-16 20:30:51 -07:00
bjorn 4372eb293e rm comma operator;
everyone is making fun of me haha
2019-07-10 18:46:51 -07:00
mcc 8bfc8683db Patch maf.h so it can be included in C++
A C-only feature is used in one spot currently, which would be fine if maf.h were maf.c, but it's designed to be #included...
2019-07-10 14:58:55 -07:00
mcc 99f8122f23 ref.h compiles in C++
Check for GCC version >=4.7 [covers GCC or, theoretically, Intel C Compiler] or __has_builtin(__atomic_add_fetch) [covers Clang]. If either of these are found, prefer the GCC atomic builtins instead of the C11 builtins.

Also: Gates Microsoft atomics on _MSC_VER, not _WIN32. This may help improve compatibility with mingw but has not been tested.
2019-07-10 14:58:25 -07:00
mcc 53270fbd76 mat4_transform_project in maf.h
mat4_transform ignores the final row of the matrix, which normally contains scale data. This is fine for modelview matrices, which is all lovr currently uses mat4_transform for. However it fails if you ever use mat4_transform on a projection matrix.

mat4_transform_project takes the final row into account, so you can use it with projection matrices. This was useful in my fork and might be useful to have around in lovr someday later.
2019-07-02 13:37:33 -07:00
bjorn b17d01e4aa Don't return NULL from mat4_invert; 2019-06-22 17:25:48 -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 c10851d726 Fix tostring; 2019-06-20 13:47:43 -07:00
bjorn 6b2d06e766 Add lovrPlatformOpenConsole; 2019-06-16 18:55:43 -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 79083c7df1 Fix warnings on newer versions of gcc; 2019-06-11 19:57:20 -07:00
bjorn 31a1dc6cee Details; 2019-06-10 03:39:53 -07:00
bjorn c0f4e2848b Update android build; 2019-06-05 20:22:51 -07:00
bjorn 06c6b172de vec3 has 4 elements; 2019-06-03 07:20:03 -07:00
bjorn 31e086edaf Inline all the maf functions; 2019-06-03 07:19:25 -07:00
bjorn dc34ed4570 Start to trend towards 4-element arrays for vec3;
It will be important for enabling more SIMD.
2019-06-02 20:35:52 -07:00
bjorn c7a2e513d3 Inline hash function; 2019-06-02 04:15:46 -07:00
bjorn 374492c586 Add experimental hotkeys flag;
- Add t.hotkeys flag to conf.lua, which defaults to true.
- If t.hotkeys is truthy, the following hotkeys will be enabled:
  - Escape: Quit the experience
  - F5: Restart the experience
2019-06-02 03:00:12 -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 d11e9be175 Lua userdata store their destructor in their metatable; 2019-05-28 16:31:13 -07:00
Bjorn Swenson 5ec6f1d1d1
Merge pull request #120 from mcclure/oculus-quest
Oculus quest support
2019-05-28 16:30:17 -07:00
bjorn 1cfc2adf4a Fix typo; 2019-05-28 02:45:08 -07:00
bjorn 6b439327fa Make refcounts atomic; 2019-05-28 02:43:15 -07:00
mcc f4189d13e8 Oculus Mobile fixes: Fix potential crash, fix touches on Go after Quest changes 2019-05-26 11:17:49 -04:00
bjorn 3804a1c0ee lovrPlatformGetName;
Used in lovr.getOS.
2019-05-20 20:44:39 -07:00
bjorn 4cc154fdfa More number conversions; 2019-05-20 20:35:07 -07:00
bjorn e87b81e34a Fix android platform include order; 2019-05-20 15:16:27 -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 c31853a1d4 Fix build; 2019-05-20 14:31:46 -07:00
bjorn 67b76e08c2 Details; 2019-05-20 04:15:24 -07:00
bjorn e368723248 Improve platform-specific defines; 2019-05-20 04:05:39 -07:00
bjorn 67ddefd0c2 Ensure platform functions have prefix; 2019-05-20 04:02:25 -07:00
bjorn 7645f4c014 Add core folder; 2019-05-20 02:47:33 -07:00