Commit Graph

270 Commits

Author SHA1 Message Date
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
bjorn d5ed4aef43 Set C standard version to C99 in CMakeLists;
This requires CMake 3.1.0.
2018-03-17 14:44:13 -07:00
Bryan 9f2a9c67a1
Fix linux build
On (arch) linux, compilation would not complete due to the following error:
```/usr/bin/ld: CMakeFiles/lovr.dir/src/lib/tinycthread/tinycthread.c.o: undefined reference to symbol 'pthread_mutexattr_settype@@GLIBC_2.2.5'
/usr/lib/libpthread.so.0: error adding symbols: DSO missing from command line
collect2: error: ld returned 1 exit status```

Adding `-lpthread` to the linker flags fixes this
2018-03-02 17:37:41 -07:00
bjorn 8fb3421658 Fix everything on windows; 2018-02-23 18:38:53 -08:00
bjorn a0ebf25e7d Fix CMakeLists; 2018-02-20 23:10:20 -08:00
bjorn d5a1928b3d Rename a bunch of files; 2018-02-11 15:22:04 -08:00
bjorn 0ae9f3eb5b Fix CMakeLists; 2018-02-11 13:40:36 -08:00
bjorn 1d0ca6b763 Add stb_image_write to CMakeLists; 2018-02-10 10:32:16 -08:00
bjorn 9ec2db57a6 Add missing CMake file; 2018-01-29 22:08:17 -08:00
bjorn 14a54fa7b0 rm MaterialData; 2018-01-29 21:44:32 -08:00
bjorn 4a68067e28 rm AnimationData; 2018-01-29 20:30:13 -08:00
bjorn 9453d979bf ily cmake; 2018-01-22 18:51:34 -08:00
bjorn 253cadf714 Update CMakeLists; 2018-01-22 09:05:44 -08:00
bjorn 9cd47faf05 Rename SourceData to AudioStream; 2018-01-21 12:54:16 -08:00
bjorn 02f3a1867c Add files to CMakeLists; 2018-01-20 22:22:43 -08:00
bjorn e9b1eee9ff Fixes for latest emscripten; 2018-01-01 20:37:36 -08:00
bjorn c08a189b16 Switch back to emscripten-included zlib; 2017-12-17 19:45:50 -08:00
bjorn 72aa7e858a Rename loaders to data; 2017-12-10 12:41:43 -08:00
bjorn 4a2cc56fef Move shaders into resources; 2017-12-10 12:41:43 -08:00
bjorn 7ca6e4026c Update CMakeLists; 2017-12-09 20:10:36 -08:00
bjorn 81fe72a420 Fix WebVR build; 2017-11-23 13:09:04 -08:00
bjorn 4881d2ebbe Ignore openvr bin directory; 2017-11-20 22:36:18 -08:00
bjorn 2d588638e7 Tranquilize OpenAL; 2017-11-20 22:03:57 -08:00
bjorn 33c5f6f8b5 CMake; 2017-11-02 23:55:28 -07:00
bjorn 87ccedb166 Add AnimationData to CMakeLists; 2017-11-01 23:56:57 -07:00
bjorn 5cc0fced70 Re-enable physfs zip support in emscripten; 2017-10-23 19:24:29 -07:00
Bjorn Swenson 618be7b51d Merge pull request #24 from bcampbell/fake-headset
Fake headset
2017-10-23 11:24:03 -07:00
bjorn a2a90f5c85 Add support for HRTF under emscripten; 2017-10-22 21:55:23 -07:00
Ben Campbell f8e05c99e0 build: switch webvr and openvr by platform 2017-10-23 12:24:35 +13:00
Ben Campbell a22a9ed1f4 Merge branch 'master' into fake-headset 2017-10-23 09:32:32 +13:00
bjorn cd9d2a442e Nevermind that didn't work; 2017-10-22 08:41:40 -07:00
bjorn 745922dbb5 Note version requirement for glfw; 2017-10-22 07:46:36 -07:00
bjorn a3cfbb6023 Only enable windows console subsystem for Debug builds; 2017-10-22 02:26:06 -07:00
bjorn dfc7d6bfab Upgrade to physfs 3; 2017-10-22 00:35:07 -07:00
bjorn d3f6110d73 Fix windows build; 2017-10-21 21:52:05 -07:00
bjorn 1bc62595e1 Suppress warnings about loss of precision in win32; 2017-10-21 21:51:39 -07:00
bjorn 736adf03e1 Add support for glTF models; 2017-10-21 15:31:41 -07:00
bjorn 094540e7c6 Add material files to CMakeLists; 2017-10-21 15:21:43 -07:00
bjorn b82ed7fd56 Put shaders in their own file; 2017-10-21 13:21:30 -07:00
bjorn a2860361e9 Consolidate Texture and Skybox; 2017-10-21 13:00:13 -07:00
Ben Campbell c694f56439 pick appropriate headset implementation at runtime
(just fake and openvr for now. Need to add webvr support still)
2017-10-21 22:39:33 +13:00
Ben Campbell 8f97384951 cheesy hack to module load order to get fake headset running 2017-10-12 23:04:18 +13:00
Ben Campbell 7b20ad9650 fix the msvc defs fix 2017-09-22 23:03:31 -07:00
Ben Campbell 9b8040777d cmakelist: fix msvc defs leaking to other platform
The MSVC_VERSION check was kicking in on Linux (and presumably OSX),
and causing redefines of `inline` and `snprintf`, and failing the
build with  lots of "undefined reference to `_snprintf'" errors.
2017-09-22 23:03:31 -07:00
Ben Campbell 8c74a6d816 fix the msvc defs fix 2017-09-23 10:26:40 +12:00
Ben Campbell 169eae2ba5 cmakelist: fix msvc defs leaking to other platform
The MSVC_VERSION check was kicking in on Linux (and presumably OSX),
and causing redefines of `inline` and `snprintf`, and failing the
build with  lots of "undefined reference to `_snprintf'" errors.
2017-09-23 09:53:03 +12:00
Colby Klein 5fb58b3a0f fix build for msvc 2013 2017-09-10 16:03:43 -07:00
bjorn 8e5e8e81ca OpenAL fallback for Unix; 2017-09-05 22:13:01 -07:00
bjorn a5760beb4e Use ALLOW_MEMORY_GROWTH; 2017-09-02 17:31:20 -07:00
bjorn 8094eb9a25 Remove message from CMakeLists; 2017-08-11 22:28:15 -07:00
bjorn 5662093451 Fix enet CMake for Linux; 2017-08-03 00:57:28 -07:00
bjorn 48733f87c4 Just use EMCSRIPTEN instead of LOVR_WEB; 2017-08-01 12:16:09 -07:00
bjorn 9bf73060b7 WASM; 2017-07-31 03:45:57 -07:00
bjorn fd3613ba8d Fix enet CMake; 2017-07-30 22:12:12 -07:00
bjorn cb4c484e2f Simplify OpenVR CMake; 2017-07-29 16:29:51 -07:00
bjorn 891d8a8ff4 Add random functions to CMakeLists; 2017-07-26 22:48:43 -07:00
bjorn ce26850a8a Fix enet on windows; 2017-07-24 01:29:14 -07:00
bjorn d78e986a05 Fix compilation issues; 2017-07-23 23:14:28 -07:00
bjorn 54f9357b3e Fix CMakeLists for emscripten; 2017-07-23 23:03:13 -07:00
bjorn cb7ac8e656 Add enet; 2017-07-23 23:03:13 -07:00
bjorn 052a1f803c Fix CMake warning; 2017-07-23 22:56:45 -07:00
bjorn abaecb7f60 Font fixes; 2017-07-18 21:48:08 -07:00
bjorn c7fceb5a60 CMakeLists msdfgen; 2017-07-19 07:00:11 +09:00
bjorn e485f7d628 Fix glad in windows; 2017-06-23 19:42:58 -07:00
bjorn 8beac66db0 OpenGL ES3; Remove glad;
Stop using OpenGL extensions and drop support for OpenGL ES2,
WebGL 1, and OpenGL 2.  Remove glad.
2017-06-18 15:55:01 -07:00
bjorn 2a07cddc5a Fix emscripten compilation; 2017-06-10 23:18:32 -07:00
bjorn bb5df10f28 ODE shared library; 2017-06-10 03:12:31 -07:00
bjorn 7241d1c5f7 Fix freetype library setting; 2017-06-10 02:59:12 -07:00
bjorn 8110fe10e9 rm unnecessary CMake definition; 2017-06-06 23:43:33 -07:00
bjorn a5d06dcb61 Fix CMakeLists; 2017-06-03 14:18:17 -07:00
bjorn 9bfc2f7525 Update CMakeLists; 2017-06-01 23:48:46 -07:00
bjorn 851e528d57 Simplify CMakeLists; 2017-06-01 22:06:13 -07:00
bjorn b04979da8d Update CMakeLists; 2017-05-29 10:31:46 -07:00
bjornbytes 1fe86d5c71 Update CMakeLists; 2017-05-28 21:53:19 -07:00
bjorn 61eb7d0f40 ODE CMake; 2017-05-26 23:23:41 -07:00
bjorn c9be126b6b Small fixes; 2017-04-22 17:02:47 -07:00
bjorn bff289e431 Fix compilation; 2017-04-21 19:05:16 -07:00
bjorn ed145ca186 Fix freetype; 2017-04-20 23:46:51 -07:00
bjorn 872ceb365d WIP; 2017-04-19 21:44:35 -07:00
bjorn 0f1acae42a WIP; 2017-04-16 16:56:49 -07:00
bjorn 3e58ce4e55 JSON; 2017-04-13 23:11:03 -07:00
bjorn e8d8aceead Remove duplicate LOVR_OPENVR entry; 2017-03-31 12:48:08 -07:00
bjorn dcadbe37ce Fix glad on windows; Remove GLEW; 2017-03-31 03:20:53 -07:00
bjorn fd8a53cb2c Fix CMake for macOS; 2017-03-31 00:18:06 -07:00
bjorn 93dfc6dc46 Simplify CMakeLists; 2017-03-31 00:06:05 -07:00