Commit Graph

354 Commits

Author SHA1 Message Date
bjorn 51afbd9fd4 CMake: Also include msdfgen so when building as .app; 2020-01-24 22:10:15 -08:00
bjorn a0634005f3 CMake: Turn MACOSX_RPATH ON for msdfgen;
I think it's off because it's targeting an older version of CMake
or something.  There was a warning about CMP0042 as well.
2020-01-24 22:02:13 -08:00
bjorn 158fcca994 CMake: explicitly link with objc runtime on macOS; 2020-01-22 16:30:21 -08:00
bjorn dd6d737a43 CMake: compile binary resources earlier; 2020-01-09 21:57:13 -08:00
Nevyn Bengtsson d987dd0dc3 Bump msdfgen + add move_dll for it
Fixes #184
2020-01-06 20:19:52 +01:00
bjorn c9b1f257bf api: try new file naming convention; Tupfile: cleanup;
I assume full responsibility for any catastrophes this causes.
2019-12-31 19:31:44 -08:00
bjorn f12a092739 OpenXR build instructions;
It is probably bad that there is not a better place to put this,
but it is better than nothing.
2019-12-31 18:29:18 -08:00
bjorn d228dc95d7 Automatically convert binary resources;
- Teach CMake how to compile binary resources to C headers, like xxd.
- Note: tup is already using xxd to do this.
- gitignore binary resource headers to reduce git noise and avoid problematic
  interactions between git and build systems.
2019-12-29 11:25:30 -08:00
mcc 21a52368f5 Patch in thread local storage for stb_image vflip
This makes loading images in multiple threads concurrently safe.

Adds a new CMake variable LOVR_USE_THREADLOCAL, by default on
2019-12-20 16:09:18 -05:00
mcc 3ff94d8797 Bring back old File C API (read-only currently)
This code path is not used anywhere in this commit, but aids in developing Lovr addons.
2019-12-17 20:06:42 -05:00
bjorn e2d8f8c645 platform -> os;
The function names are staying the same for now.
2019-12-13 19:55:46 -08:00
bjorn 33991b41ad tup macOS fixes;
- Need to use dylib suffix.
- Need pagezero stuff (should we only do this when using LuaJIT?)
- rpath is totally different.
- stb_vorbis alloca broke?
2019-12-13 07:27:37 -08:00
bjorn 584d627784 CMake: Add LOVR_BUILD_EXE;
This flag can be turned off to only build dependencies.
2019-12-13 03:35:02 -08:00
bjorn 2f9400a5f7 Adjust includes; 2019-12-10 13:01:28 -08:00
bjorn 488c125c5f Draw the rest of the owl; 2019-12-10 12:19:50 -08:00
bjorn fd16865dd1 Enable threads for wasm builds; 2019-12-05 13:37:27 -08:00
bjorn c904872df0 rm unused wasm zlib flag; 2019-12-05 12:43:57 -08:00
bjorn 871542bddf Use relative rpath on Linux; 2019-12-04 14:07:35 -08:00
bjorn 25bdc05343 rm unused physfs cmake option; 2019-11-23 01:17:00 -08:00
bjorn 23c36597fc CMake: Suppress giant OpenVR warnings; 2019-11-11 19:14:35 -08:00
Bjorn 26aa87034a
Merge pull request #166 from alloverse/fix/vs2019
Fix move_dll for VS2019
2019-11-07 14:26:03 -08:00
Nevyn Bengtsson 66aa0449a5 Fix move_dll for VS2019
TARGET_FILE_DIR will do the right thing regardless of VR version
2019-11-07 23:09:47 +01:00
bjorn 0bd5fced12 Use new glfw method for avoiding chdir; 2019-11-03 15:31:21 -08:00
bjorn d21911d010 Add core/map hash table; rm lib/map; 2019-10-30 00:07:05 -07:00
bjorn 50279d1d9f LOVR_USE_LUAJIT define is not used; 2019-10-22 20:21:41 -07:00
bjorn b35ebc15b6 rm LOVR_USE_SSE;
It doesn't really improve performance on an average LÖVR app and
isn't worth the complexity.
2019-10-22 16:46:54 -07:00
bjorn 505d315c18 Tell GLFW to not change the working directory; 2019-10-14 16:10:48 -07:00
bjorn c8fd4d1f29 CMake: Add LOVR_BUILD_BUNDLE to build as .app on macOS; 2019-10-14 15:24:27 -07:00
bjorn 8c0ae3fbb3 More WebVR (controller) fixes; 2019-10-09 14:54:07 -07:00
bjorn d8d07bfbe8 CMakeLists: Fix the order of words the; 2019-10-09 13:38:01 -07:00
bjorn e9cec44298 Update emscripten compile flags;
- wasm is the default now
- -Os makes things way smaller
- rm unused mat4_translate function
2019-10-09 13:36:35 -07:00
bjorn 5f404e2b1f WebVR fixes;
- Re-add the maf.c file that exports all the maf symbols.
- Fix lovrGpuTock for WebGL.
2019-10-07 19:50:17 -07:00
bjorn eb83962fc6 OpenXR fixes; 2019-10-02 16:29:09 -07:00
bjorn e96c541244 Multithreaded builds on Windows; Formatting; 2019-09-18 16:12:08 -07:00
bjorn fb2d8aae2c Fix CMakeLists; 2019-08-21 16:33:13 -07:00
bjorn cd09e1e695 rm sds; 2019-08-21 16:30:20 -07:00
bjorn 8d4760167f luax is now api; 2019-08-21 15:27:26 -07:00
bjorn 23bba1d59b CMake; 2019-07-16 20:30:51 -07:00
mcc 6f45b90044 Fix CMakeLists.txt after animator removed 2019-07-11 13:30:26 -07:00
bjorn 79a19ef267 Fix M_PI redefinition;
We just set it in util now.
2019-06-28 00:13:45 -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 0e5a55b641 Update CMakeLists; 2019-06-02 01:09:22 -07:00
bjorn 5b1e281d4c Switch to a fork of LuaJIT that supports android; 2019-05-21 00:26:21 -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
bjorn 4a47afca38 Organize api folder; 2019-05-19 00:31:42 -07:00
bjorn 1792f066f2 Fix CMakeLists; Fix buffer unmapping; Formatting; 2019-05-18 01:09:06 -07:00
bjorn 6f7c30e7e2 Single-translation-unit experiment; 2019-05-15 12:05:56 -07:00
bjorn 8ee7a7c9a3 haha windows; 2019-05-13 04:28:42 -07:00
bjorn b86340ac69 LOVR_USE_LEAP is false by default; 2019-05-12 22:23:02 -07:00
bjorn aa1d33669c Just use leap; 2019-05-12 22:22:29 -07:00
bjorn 5ff49e73c2 Leap WIP; 2019-05-12 22:22:29 -07:00
bjorn 1eabf45483 Update CMakeLists; 2019-05-12 22:22:29 -07:00
bjorn 2dea0eacfb Use -fvisibility=hidden to hide symbols by default;
This saves some space, and it's better to be conscious about symbol exports.
2019-04-20 16:20:05 -07:00
bjorn c0cc4fbd85 Fix CMakeLists; 2019-04-20 16:05:58 -07:00
bjorn 5a25803875 CI test; 2019-04-13 18:56:54 -07:00
bjorn d6d3123114 Maybe this will fix the GLFW dll on appveyor?; 2019-04-13 17:59:01 -07:00
bjorn 9131c26fab Fix Android build; 2019-04-11 15:26:59 -07:00
bjorn 6e75ebafac Fix windows build; 2019-04-05 06:01:12 -07:00
bjorn 94f112dea3 Disable SSE on arm;
Currently we turn off SSE based on the OS (Android or Emscripten),
but this causes a build error on non-android arm CPUs.  Now we
correctly look at the CPU architecture.
2019-04-05 01:21:33 -07:00
bjorn 85c51399a6 Fix MSVC warnings; 2019-03-17 00:58:13 -07:00
bjorn d45e56146a Rename fake to desktop; 2019-03-06 23:02:47 -08:00
Bjorn Swenson 86ef954287
Merge pull request #111 from mcclure/oculus-fix-19feb
Fix Oculus driver compilation
2019-03-06 22:25:31 -08:00
bjorn 2b41d6948c CMake: move_dll works with empty arguments; 2019-03-06 11:06:02 -08:00
bjorn db642dc406 Fix CMake typo; 2019-02-18 14:37:52 -08:00
bjorn 5ddc15c612 Add _CRT_SECURE_NO_WARNINGS; 2019-02-17 14:58:01 -08:00
bjorn 6a443e0dca rm assimp; 2019-02-13 15:10:52 -08:00
bjorn a02d4eb659 rm VertexData; 2019-02-13 15:10:52 -08:00
bjorn 6857b01ac0 Start OBJ parser; Optimize glTF parsing; 2019-02-13 15:10:52 -08:00
bjorn 6b323e3476 Start parsing glTF; 2019-02-13 15:10:52 -08:00
mcc 865fc1467f Let's mention the last tested version of oculus sdk in CMakeLists 2019-02-08 15:02:29 -05:00
bjorn f53f64933c WebGL fixes; 2019-02-08 10:32:05 -08:00
bjorn 30acdd1347 Add semantic GL defines; 2019-01-29 16:05:27 -08:00
bjorn 5770b63108 Revert "Add stb_sprintf;"
This reverts commit da565296fd.
2019-01-24 17:40:22 -08:00
bjorn da565296fd Add stb_sprintf; 2019-01-18 08:55:29 -08:00
bjorn ea3a77a73a Many batching improvements; Refactoring; 2019-01-04 18:01:01 -08:00
bjorn c87645e8ef Put non-opengl-specific stuff in their own files; 2019-01-04 18:01:01 -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
mcc 778b654f1d Move lovr.android.getApplicationId() to lovr.filesystem.getApplicationId(). Kill Android module
This requires adding an application id function to platform and adding a mini definition to sds into platform.h. All platforms except Android return NULL (no application id)
2018-11-27 15:02:25 -08:00
mcc adabf4c6ef Fix broken android lua module
The LOVR_ENABLE_ANDROID flag wasn't getting passed to C, and the getApplicationId code had bugs
2018-11-27 15:02:25 -08:00
mcc 961bf859f6 Android lua module
Currently provides only a lovr.android.getApplicationId(). This returns an Android-specific identifier that doesn't cleanly map to anything specific in other OSes.
2018-11-27 15:02:25 -08:00
bjorn 9bc4ee7c94 Android: omit linux.c in favor of android.c; 2018-11-16 04:53:44 -08:00
bjorn fcc3313c69 rm unused LOVR_ANDROID_FLAGS;
Can be added again if necessary.
2018-11-16 04:51:59 -08:00
bjorn 63103b13a5 rm NO_WINDOW define; 2018-11-16 04:51:17 -08:00
bjorn da92cce634 Fix wasm build; 2018-11-15 08:21:26 -08:00
bjorn 1ce7e49df5 Update CMakeLists; 2018-11-15 08:18:30 -08:00
bjorn c6126bed59 Move print_override to luax;
It makes more sense for it to live there since it's a Lua override.
I misunderstood something when communicating about this initially.
2018-11-15 07:51:21 -08:00
mcc 50a110ee79 Fix Android build (add additional target_link_libraries for GLES3) 2018-11-13 22:20:19 -05:00
bjorn 0f0485d9e8 Update CMakeLists; 2018-11-08 12:56:45 -08:00
mcc 2675b51013 Make oculus mobile build self-contained
The initial version of the oculus mobile driver incorporated two files, BridgeLovr.cpp and BridgeLovr.h, which were assumed to be outside of the Lovr repo in the repo for a separate Android app. The Android app now is wholly separated and communicates with the Lovr shared object via the interface in oculus_mobile_bridge.h.

A file print_override.c now contains a drop-in replacement for Lua print() which prints to lovrLog. This is useful for Android or for other future platforms where stdout/stderr aren't usable.
2018-11-07 10:24:44 -05:00
mcc b146ad422f Add SDS string library from commit 8dc8d6fb373bdc08eb82a72904841998d30b7cf2 2018-11-06 18:39:12 -05:00
mcc 141ebfb0e9 Switch BridgeLovr to C 2018-11-06 18:37:28 -05:00
mcc 8301bd7dd8 Remerge oculus-mobile branch with master 2018-11-02 18:10:08 -04:00
bjorn 0945702d27 Update CMakeLists for new platform layer; 2018-10-29 17:13:53 -07:00
mcc 79b0c19254 Oculus mobile: First round of fixes requested in PR review
Formatting, back out bad change to Win32 build, support getOs()
2018-10-28 22:55:37 -04:00
mcc dd440b2ada Code cleanup after all these changes, fix build 2018-10-28 15:31:27 -04:00
mcc b892d0143f Remerge oculus mobile and master branches (to get lovrCanvasCreateFromHandle) 2018-10-25 00:06:39 -04:00
mcc 5ad8fdd3e3 Fixes as far as running without crashes, no display yet 2018-10-24 23:40:11 -04:00
bjorn 66fdcc742a CMakeLists: Improve LOVR_USE_OCULUS error reporting; 2018-10-24 09:52:25 -07:00
bjorn 8ab26fe436 Fix wasm compilation issues; 2018-10-24 09:42:31 -07:00
mcc 56f8f1e26b Untested merge of Oculus Mobile branch and Oct 2018 lovr master 2018-10-22 10:44:04 -04:00
mcc 7fc6c689e6 Add Apportable OpenAL to CMake 2018-10-21 12:00:18 -04:00
bjorn 4f542902a1 mv lovr.js webvr.js;
To allow for webxr.js and lovr.js to be used for...other things.
2018-10-21 08:56:57 -07:00
mcc 1b7942e02f First pass oculus mobile support
First of several commits, this is the state of hg:6b437880cc01 in my private repo. A version of shakesoda's Oculus-desktop support is tied up in this commit.

The oculus mobile version builds lovr as a library. To run it, you need to use a separate repo which includes this one and which builds an Android app.
2018-10-20 15:22:24 -04:00
bjorn 4279cf086f mat4_invertPose;
~3.9x
2018-10-06 21:21:25 -07:00
bjorn 7354465e12 Add LOVR_USE_SSE; 2018-10-06 20:03:48 -07:00
bjorn 5969ef143e Yeah yeah CMake I know; 2018-09-27 18:38:44 -07:00
bjorn 2a17f6e4bb Add LOVR_USE_ASSIMP;
lovr.graphics.newModel and lovr.data.newModelData will return nil
if assimp is disabled.
2018-09-21 19:25:48 -07:00
bjorn 7932f3340a Use target_sources; 2018-09-21 19:25:48 -07:00
bjorn 27ce2f7bed Maybe fix windows build; 2018-09-21 19:25:48 -07:00
bjorn 2d788e2f41 rm USE_OPENAL; 2018-09-21 19:25:48 -07:00
bjorn 5a9cd5187c Make CMakeLists more modular;
- Enable/disable individual modules, including enet/json
- Enable/disable different "backends" (audio/headset)
- Choose to use system vs. source versions of different libraries
2018-09-21 19:25:48 -07:00
bjorn 09a67949ed Improve CMake and build for LibOVR; 2018-09-11 15:47:03 -07:00
bjorn 72158f103a Update for stereo rendering and new headset API; 2018-09-11 15:30:31 -07:00
bjorn 5b5e9fbc00 WIP; 2018-09-11 15:30:31 -07:00
bjorn 8b7bfec9d3 Add emscripten shell file;
To make it easier to build and test WebVR.
2018-09-06 16:05:39 -07:00
bjorn f872a5f094 Re-enable threads for emscripten;
They don't appear to work very well but this simplifies code a lot.
2018-08-30 22:09:54 -07:00
bjorn b7faeb8c44 Add precision for ints; 2018-08-30 21:37:45 -07:00
mcc 230fd69c17 Fix Windows build with -DLOVR_OPENAL=0 2018-08-20 16:36:07 -04:00
mcc 883883f0fa Introduce -DUSE_OPENAL=0 CMake option which prevents inclusion of OpenAL 2018-08-20 16:33:16 -04:00
bjorn 2b1f3c0ef3 Support 64 bit builds;
Use correct cmake target for openvr.
2018-08-11 03:57:14 -07:00
bjorn 527e3f410f rm freetype from CMakeLists; 2018-08-10 18:49:48 -07:00
bjorn 8d9ccbf2ba Disable COLLADA importer; 2018-08-09 14:50:43 -07:00
Bjorn Swenson 06379f33ee
Merge pull request #49 from bjornbytes/shader-block
ShaderBlock
2018-08-07 15:17:06 -07:00
bjorn f973f259c7 Update CMakeLists; 2018-08-03 18:39:04 -07:00
bjorn 1ebb5256d9 Update CMakeLists; 2018-08-02 03:41:21 -07:00
bjorn c375797af9 Update CMakeLists; 2018-07-17 17:21:15 -07:00
bjorn 416468fd8b Update CMakeLists; 2018-07-06 18:42:14 -07:00
bjorn b650f2b770 Add Microphone objects for audio capture; 2018-07-06 17:57:31 -07:00
bjorn b6dde5d66a Update CMakeLists; 2018-07-05 23:34:12 -07:00
bjorn 71fc34aea9 Update CMakeLists; 2018-07-04 14:13:53 -07:00
bjornbytes c68d65441c Draw the rest of the fucking owl; 2018-05-27 19:05:10 -07:00
bjorn b51e8694ac Add lovrQuit; 2018-05-27 19:05:10 -07:00
bjorn ab2594b204 WebVR velocity functions; 2018-05-27 19:05:10 -07:00
bjorn 065a5aa0dd Finish webvrGetPose; 2018-05-27 19:05:10 -07:00
bjorn 615144c74a Clean up more CMake flags; 2018-05-27 19:05:10 -07:00
bjorn 04a5202d0d Disable Lua popen support in emscripten; 2018-05-27 19:05:10 -07:00
bjorn aef08a9719 Clean up some CMake flags; 2018-05-27 19:05:10 -07:00
bjorn 26be8a5113 Suppress some ODE warnings in emscripten build; 2018-05-27 19:05:10 -07:00
bjorn 3d253a8acb Fix lovr.js path; 2018-05-27 19:05:10 -07:00
bjorn 498a1843ad Work on WebVR pose input; 2018-05-27 19:05:10 -07:00
bjorn 859251d020 Start WebVR rewrite; 2018-05-27 19:05:10 -07:00
bjorn b8eb2799f9 Fix quotes for windows shells; 2018-05-27 19:05:10 -07:00
bjorn 93e082c8cc WebVR;
- Add FORCE_FILESYSTEM
- Handle THREAD_ERROR event with noop case
- Remove hopefully redundant lovr.graphics.clear in errhand
- Finally use correct type signature for assimpFileTell
2018-05-27 19:05:10 -07:00
bjorn 012ba07063 Disable threads in WebVR;
Browser/emscripten support is currently unstable.
2018-05-27 19:05:10 -07:00
bjorn 2f6a25a1ff Also link against libccd for ode on macOS; 2018-05-15 19:53:44 -07:00
bjorn c386cdd94f rm XOPEN_SOURCE to fix macOS issue; 2018-05-14 21:39:07 -07:00
bjorn 7a309c88ca Update OpenAL so it works with newer CMake versions; 2018-04-11 00:57:27 -07:00
bjorn 9ffd7888c6 Add _XOPEN_SOURCE definition for linux; 2018-03-23 19:38:30 -07:00