Commit Graph

3250 Commits

Author SHA1 Message Date
bjorn 70839535f3 WIP; 2021-02-08 16:08:29 -07:00
bjorn 121a4f7108 Start spatialization and data conversion systems; 2021-02-08 16:08:29 -07:00
bjorn 40cffbe590 Remove integer conversion APIs from stb_vorbis; 2021-02-08 16:08:29 -07:00
bjorn 1eb4070c92 Mixing; 2021-02-08 16:08:29 -07:00
bjorn 205e9404e0 Looping, playback; 2021-02-08 16:08:29 -07:00
bjorn c92b47e3a6 Another miniaudio attempt WIP; 2021-02-08 16:08:29 -07:00
bjorn ed09bc3cfa rm unnecessary newlines in assert messages; 2021-02-07 16:58:50 -07:00
bjorn 1dd692a009 lovrPlatformGetWindow -> lovrPlatformGetWin32Window; 2021-02-07 16:57:08 -07:00
bjorn 47ec05d385 CMake: strip android libraries; 2021-02-07 16:53:54 -07:00
bjorn 0e375804fe Only include <lualib.h> when needed; 2021-02-07 16:51:31 -07:00
bjorn 323436898a Add WIN32_LEAN_AND_MEAN; 2021-02-07 16:49:34 -07:00
bjorn 4cf89fa6db Fix CMakeLists; 2021-02-07 16:48:25 -07:00
bjorn d2ff6c29ac Change inclusive module defines to exclusive;
This reduces the number of flags needed to get a regular build.
2021-02-07 16:45:03 -07:00
bjorn 909c9f94e9 Update ode; 2021-02-06 19:15:22 -07:00
bjorn 709a41a352 Do more rendering work when lovr.draw is missing;
- The lovr.headset.renderTo callback can now be nil, causing an empty frame to be submitted to the compositor.
- lovr.mirror will still be called if lovr.draw is nil.  This means the window will be (correctly?) cleared to the background color now if lovr.draw is nil.

This prevents runtimes from thinking the app is missing/unresponsive when lovr.draw is absent.  To get the old behavior, just don't call lovr.headset.renderTo.
2021-02-05 15:03:06 -07:00
bjorn 32000bfb63 Ensure buildAPK builds after lovr; 2021-02-04 22:27:06 -07:00
bjorn 2b1bb31b4c CMake: Linux plugin/rpath/bin;
- Linux rpath is changed to $ORIGIN
- Libraries (shared libraries and plugins) are copied to executable.
- Executable is output to bin dir for easier packaging.

Need to look into consolidating the move_lib functions for each platform.
2021-02-02 03:19:55 -07:00
bjorn 8038353eac tup: output to bin folder; toplevel config; 2021-02-01 23:48:15 -07:00
bjorn deeaff7a00 lovr.filesystem.write/append take Blobs; 2021-01-20 10:55:10 -07:00
bjorn f1a5887133 WIP holographic_controller bindings; 2021-01-08 21:18:03 -07:00
bjorn 4f5b044c1d Update README; 2021-01-07 14:42:07 -07:00
bjorn d66a97bf40 Update README; 2021-01-07 14:38:47 -07:00
bjorn 0c03be1090 tup updates;
- rm json and enet (they're plugins now)
- ignore a warning in stb_image
2021-01-07 14:35:28 -07:00
Bjorn 6756a94cb9
Merge pull request #353 from bjornbytes/plugins
Plugins;
2020-12-31 17:18:42 -07:00
bjorn 60c45c4c68 Bump msdfgen; 2020-12-28 15:11:49 -07:00
bjorn 3f975bcc8f Android plugin support;
- Link against dl (this was probably why ffi.load didn't work)
- Store shared libraries in the apk uncompressed
  - Libraries are added during the "package" aapt call instead of "add".
    - Because -0 (used to store uncompressed) only works during package.
    - classes.dex is added here too now.
    - There's only one aapt invocation now, which is kinda nice.
  - The lib folder needs to be in a subfolder now ("raw" was chosen).
    - Because "package" and "add" subcommands work differently.
  - Store shared libraries in the apk page aligned
    - Required passing -p to the zipalign invocation.
    - This is needed because dlopen("zip!path") needs it.
  - android:extractNativeLibs="false" is added to the XML manifest.
  - apk sizes are bigger, but disk usage and install time should improve.
- Fix a bug with moving plugin libraries into the lib folder with CMake.
- Use lovrFilesystemGetSource instead of lovrFilesystemGetExecutablePath
  to get the proper path to the apk.
2020-12-28 14:45:56 -07:00
bjorn 5fdf88224d Plugin loader uses platform-native path separator; 2020-12-28 12:37:35 -07:00
bjorn bc5ed02d7d Plugins autolink against Lua; 2020-12-28 12:37:35 -07:00
bjorn b356ce2546 Plugins;
- The plugins folder can contain native plugins.
- CMake will build plugins with CMakeLists in them
  - They can check the LOVR variable to see if they are being built inside LOVR.
  - They can set the LOVR_PLUGIN_TARGETS variable to a list of targets they build.
    - If blank, all non-imported targets added in the folder will be used.
  - The libraries built by their targets will be moved next to the executable or into the apk.
- The library loader now tries to load libraries next to the executable or in the APK.
  - It is "fixed function" now, this may be improved in the future.
- The lovr.filesystem C require path has been removed.
- enet and cjson have been removed.  Use plugins.
2020-12-28 12:37:35 -07:00
bjorn 31defbe145 maf windows PI fix; 2020-12-28 12:37:19 -07:00
bjorn 32fb7a7cb2 rm --root arg; 2020-12-25 16:52:06 -07:00
bjorn 30e01f94a3 Upgrade stb_image; rm stb_image threadlocal patch;
stb_image's vertical flip flag was not thread safe in the version
of stb_image we were using.  We patched stb_image to use a thread
local variable for the flag.  stb_image has since been upgraded to
expose a thread local version of the flag, so our patch is no longer
necessary after upgrading.

The CMake flag to enable the thread local patch did not make very much
sense because thread local stuff is unconditionally used elsewhere.
2020-12-25 16:43:25 -07:00
bjorn 4ded7ef37a CMake: fix duplicated os_linux source; 2020-12-25 16:19:09 -07:00
bjorn e16719c946 CMake: Set luajit EXCLUDE_FROM_ALL;
This prints a warning but it's nice to not build the luajit executable.

Ideally the target would not be created at all but the CMakeLists we
are using does not expose this as an option.

This is congruent with the vanilla Lua build options.
2020-12-25 16:17:59 -07:00
bjorn 6690ce9171 CMake: no GLFW_INSTALL; 2020-12-25 16:08:51 -07:00
bjorn 80062941dc CMake: Use target_compile_definitions more;
- Prefer PRIVATE
- Omit redundant -D
2020-12-25 16:06:40 -07:00
bjorn efc963d8f8 CMake hides symbols by default;
This is more consistent with tup.
2020-12-25 15:50:08 -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 3bc2c00b79 api doesn't include util; 2020-12-25 12:50:26 -07:00
bjorn 9bdceb0094 rm LOVR_INLINE;
Just use the inline keyword which is C99.  Getting util.h out of
maf.h is nice.
2020-12-25 12:29:22 -07:00
bjorn 1a8f972f39 rm MAF_EXPORT;
It was only used when exporting functions for JavaScript.
2020-12-25 12:22:42 -07:00
bjorn 1fc1af8203 rm LOVR_EXPORT from luaopen_lovr definition;
It's only needed on the declaration.
2020-12-25 12:22:10 -07:00
bjorn 25811f1c01 Change default require paths;
The lua_modules+deps paths were added for a LuaRocks experiment.
2020-12-25 12:20:58 -07:00
Bjorn 1513191660
Merge pull request #335 from bjornbytes/trackers
Support Vive Trackers;
2020-12-10 21:49:26 -07:00
bjorn d33053cd01 Add comment; 2020-12-03 09:03:43 -07:00
bjornbytes eb319fdade Fix trailing whitespace; 2020-11-21 14:37:47 -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
bjornbytes 314a5a9a2d vrapi: cleanup; fix getPose for non-head/hands devices; 2020-11-21 14:24:20 -07:00
bjornbytes 71456dce6e tup: default CC to clang; 2020-11-21 14:14:22 -07:00