Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
148 commits
Select commit Hold shift + click to select a range
d0b4cbb
Prioritize loading game from command line over embedded
nevyn Nov 3, 2019
cba1e34
disable stereo on desktop
nevyn Nov 3, 2019
5e8b28c
Merge remote-tracking branch 'upstream/master'
nevyn Nov 8, 2019
255674c
Merge remote-tracking branch 'upstream/master' into alloverse
nevyn Jan 16, 2020
a120409
Merge remote-tracking branch 'upstream/master' into alloverse
nevyn Jan 19, 2020
0041d22
Merge remote-tracking branch 'upstream/master' into alloverse
nevyn Jan 27, 2020
e6123d1
Merge remote-tracking branch 'upstream/master' into alloverse
nevyn Feb 22, 2020
9ee993f
Properly export symbols when built as dll
nevyn Mar 26, 2020
84e052f
Set install_name @rpath for shared lib build
Voxar Apr 1, 2020
e76bdd3
bump openal for missing mic fix
nevyn May 7, 2020
0d7c3e2
lovrMicrophoneGetData: fix potential buffer overrun
nevyn Jun 4, 2020
faa65dc
bump openal to latest master
nevyn Jun 5, 2020
1bdf254
Revert "bump openal to latest master"
nevyn Jun 11, 2020
ca67617
fork openal-soft
nevyn Jun 18, 2020
63a2f2b
Merge branch 'master' into alloverse
nevyn Aug 3, 2020
b8adbc1
Merge branch 'master' into alloverse
nevyn Aug 4, 2020
12e5afa
Embed Oculus Mobile and Pico SDKs as submodules
nevyn Aug 4, 2020
b7c5293
fix crash in lovrGraphicsGetPixelDensity
nevyn Aug 5, 2020
7a54888
android: allow passing key pass along with keystore pass
nevyn Aug 5, 2020
cf9fe26
bump openal-soft for mac 10.14 fix
nevyn Aug 10, 2020
ebaa5ce
Merge remote-tracking branch 'upstream/master' into alloverse
nevyn Aug 17, 2020
425f640
pico: fix controller position
nevyn Aug 17, 2020
60ddc9f
Submo oculus PC SDK to fix PC build on Rift
nevyn Aug 20, 2020
e56ee8b
Merge remote-tracking branch 'upstream/master' into alloverse
nevyn Aug 31, 2020
0353e85
Add lovr.graphics.getTransforms(kind) and lovr.graphics.getViewports()
mcclure Apr 9, 2020
0b7f5ba
Allow lovr.headset.init to fail
nevyn Oct 1, 2020
637433d
Revert "Add lovr.graphics.getTransforms(kind) and lovr.graphics.getVi…
nevyn Oct 16, 2020
a66edd7
Merge branch 'master' into alloverse
nevyn Oct 16, 2020
1eb9316
Merge remote-tracking branch 'upstream/pico-ibo' into alloverse
nevyn Oct 20, 2020
21c1ac9
Quest: Make tracked hands have a pose facing -Z
nevyn Oct 21, 2020
a5fa345
on lodr restart, make sure lovr.headset is nil'd if none is available
nevyn Oct 30, 2020
2554397
don't free window icon before it's used
nevyn Nov 6, 2020
3ab0204
Stack trace when background thread crashes
nevyn Nov 6, 2020
8ea1966
mmmh, I think exponential falloff audio will feel better?
nevyn Nov 18, 2020
19ffbb5
fix crash in error handler when running out of vectors
nevyn Nov 18, 2020
b972396
better fix for no-headset-crash-on-restart bug
nevyn Nov 20, 2020
f6f70ec
Another miniaudio attempt WIP;
bjornbytes May 10, 2020
d4ac1ce
Looping, playback;
bjornbytes May 18, 2020
67eb7d6
Mixing;
bjornbytes May 19, 2020
a9e2293
Remove integer conversion APIs from stb_vorbis;
bjornbytes May 19, 2020
e6d8e3d
Start spatialization and data conversion systems;
bjornbytes May 21, 2020
f5598be
WIP;
bjornbytes May 24, 2020
90bb55c
Update CMake/deps;
bjornbytes Nov 21, 2020
f5a619c
Update to new enum system;
bjornbytes Nov 21, 2020
cec7d4b
Source:pause; Source:stop; Source:isPlaying;
bjornbytes Nov 20, 2020
71044a9
Source:getDuration; Source:get/setTime;
bjornbytes Nov 22, 2020
866b847
Merge remote-tracking branch 'upstream/master' into alloverse
Voxar Nov 23, 2020
e5ba52b
bump glfw to latest master for cmakelist fix
Voxar Nov 23, 2020
fd9a334
buildAPK explicitly depends on lovr
nevyn Nov 23, 2020
782082b
move glfx to alloverse fork
Voxar Nov 23, 2020
624688f
bump glfx to master
Voxar Nov 23, 2020
38ffb4c
Merge pull request #1 from alloverse/voxar/merge-upstream
nevyn Nov 23, 2020
d999596
Fix Big sur crash on startup by removing -image_base linker flag
nevyn Nov 24, 2020
b624f36
expose Source:{get|set}Spatial
nevyn Nov 25, 2020
0e61be1
spatializer hooks to mixer
nevyn Nov 25, 2020
0d4ae86
just a super dummy spatializer
nevyn Nov 25, 2020
c78136c
make Source:setSpatial a constructor option instead
nevyn Nov 26, 2020
cc5e489
audio: clean up some magic numbers
nevyn Nov 26, 2020
8a66d86
audio capture stubs
nevyn Nov 26, 2020
1de6f2d
Capture audio (and remove more magic numbers, and clean up some misco…
nevyn Nov 26, 2020
e27b2f4
SoundData:getBlob
nevyn Nov 26, 2020
f10b21c
miniaudio: cherry-pick 2dc604ecde0f02280690c72f943bfb8bf52dd820
nevyn Nov 26, 2020
562d1bd
filesystem.append didn't append in Unix
nevyn Nov 26, 2020
a409e74
Android: Link appcompat so we can ask for audio capture permissions
nevyn Nov 30, 2020
a0a007f
Android: Link OpenSLES so miniaudio works
nevyn Nov 30, 2020
c486929
Android: Ask for audio permissions on startup
nevyn Nov 30, 2020
a29a7a6
magic numbers and typos
nevyn Nov 30, 2020
e908c86
record audio permission in manifest
nevyn Nov 30, 2020
f88f212
Audio: Don't open capture at start, allow it to be enabled later
nevyn Nov 30, 2020
c047f0d
Android: Ask for permissions on demand
nevyn Dec 1, 2020
34f8d72
review: getSpatial > isSpatial
nevyn Dec 2, 2020
df4d2c4
review: newSource() gets options table
nevyn Dec 2, 2020
f83691a
lovrPlatformRequest{AudioCapture->Permission}(Perm) + platform stubs
nevyn Dec 2, 2020
6797c8c
review: style fixes
nevyn Dec 2, 2020
70bd0ec
state.spatializer must never be null
nevyn Dec 2, 2020
90df960
review: fprintf -> lovrAssert
nevyn Dec 2, 2020
ef1a342
no need for a capture lock
nevyn Dec 2, 2020
c229953
audio_capture -> audiocapture
nevyn Dec 3, 2020
f644ae7
oops, this method can't use assert...
nevyn Dec 3, 2020
6493876
Fix broken SoundData _Reg
nevyn Dec 3, 2020
df261cf
Fix various Capture bugs
nevyn Dec 3, 2020
b5eb242
Audio permissions seem to work without AppCompat
nevyn Dec 7, 2020
47fd279
Bump miniaudio to 0.10.27
nevyn Dec 7, 2020
b265216
Merge pull request #339 from alloverse/miniaudio-new
bjornbytes Dec 7, 2020
21870d5
audio_internal.h with some shared utilities
nevyn Dec 9, 2020
1ea159a
WIP streaming SoundData
nevyn Dec 9, 2020
cf18b84
lovrSoundFormat
nevyn Dec 9, 2020
200b3a0
SoundData stream lua API
nevyn Dec 9, 2020
ac97e4d
SoundData: deallocate rb
nevyn Dec 10, 2020
411fe4f
Fix a few bugs and style fixes
nevyn Dec 10, 2020
3afb2b8
lua API for SoundData:append
nevyn Dec 10, 2020
f4e93c2
duration and time for stream sounddata
nevyn Dec 10, 2020
f478089
SoundData:setSample
nevyn Dec 10, 2020
77168fb
Separate SoundData and SoundDataStrema constructors
nevyn Dec 10, 2020
32cfdd0
don't assert on audio thread
nevyn Dec 10, 2020
86cb966
Devices WIP
nevyn Dec 10, 2020
ed7ac9a
audio.getDevices full impl
nevyn Dec 10, 2020
e4e9122
lovrAudioUseDevice
nevyn Dec 10, 2020
ac4cb27
oops
nevyn Dec 10, 2020
a9b0161
oops, initialize source's transform
nevyn Dec 10, 2020
fdd5963
oops, initialize source's transform
nevyn Dec 10, 2020
fdf01e2
Revert miniaudio to 0.10.12
nevyn Dec 11, 2020
61b75d5
Merge remote-tracking branch 'upstream/dev' into alloverse
nevyn Dec 11, 2020
a75835d
stop depending on audio from data
nevyn Dec 15, 2020
c19ff15
don't try to forward-declare mb_pcm_rb
nevyn Dec 15, 2020
0f49570
SoundDataSetSample: only allowed on raw; and check frames instead of …
nevyn Dec 15, 2020
931c378
oops
nevyn Dec 15, 2020
0d7f861
nicer assert in sound data append
nevyn Dec 15, 2020
9145a9a
take out lovrDataNewSoundDataStream
nevyn Dec 15, 2020
b516caa
bump to miniaudio with Quest fix
nevyn Dec 15, 2020
750f2d9
make converters array one of pointers
nevyn Dec 15, 2020
9015e47
fix various audio logging
nevyn Dec 11, 2020
0260bae
Merge branch 'miniaudio-streams' into miniaudio-devices
nevyn Dec 15, 2020
17f8989
allow configuring sound format and sample rate
nevyn Dec 11, 2020
627ebfd
Change mic capture API to return SoundData stream instead of individu…
nevyn Dec 16, 2020
0524026
oops
nevyn Dec 16, 2020
2f7740b
oops, capturing with wrong bytesPerFrame
nevyn Dec 16, 2020
e582147
Merge pull request #346 from alloverse/miniaudio-streams
bjornbytes Dec 16, 2020
cb06d4e
Forgot a return...
nevyn Dec 16, 2020
74d39aa
Move juaJut to Wolsoft repo and bumb for big sur patch
Voxar Jan 11, 2021
6ad2b0e
Fix getDevices API
nevyn Jan 13, 2021
e91ecdb
Audio: Simplify enabled/started/reset
nevyn Jan 13, 2021
887c519
Use the correct format in onCapture
nevyn Jan 13, 2021
48ed0a2
Don't allow invalid sample format
nevyn Jan 13, 2021
33b0ae5
ma_result_descripion all the things
nevyn Jan 13, 2021
9086663
lovrThrow instead of lovrAssert(false
nevyn Jan 13, 2021
4036147
lovrAudioSetCaptureFormat
nevyn Jan 13, 2021
7abb760
stop void* arith
nevyn Dec 18, 2020
301d163
stub out pico permissions so we can compile
nevyn Dec 18, 2020
630b77e
Merge remote-tracking branch 'origin/miniaudio-devices' into miniaudi…
nevyn Jan 13, 2021
9e679e4
setDevice fix on android
nevyn Dec 18, 2020
8b0bfbe
audio: don't uninit device on stop
nevyn Jan 19, 2021
0e3f6f7
l_audio: less code
nevyn Jan 19, 2021
417aa78
Merge pull request #347 from alloverse/miniaudio-devices
bjornbytes Jan 20, 2021
100a034
Merge remote-tracking branch 'upstream/miniaudio-new' into miniaudio-…
nevyn Jan 21, 2021
5c4fbb6
Fix broken listener orientation code in dummy spatializer
nevyn Jan 25, 2021
50cd640
bump glfw for m1 fix
nevyn Jan 12, 2021
0e95e53
forward latest focused event from glfw
nevyn Jan 14, 2021
e925034
fix focus callback thingie for macos
nevyn Jan 14, 2021
73aadb6
Merge remote-tracking branch 'origin/miniaudio-capture2' into allover…
nevyn Jan 25, 2021
6edc69a
lovr.audio.isRunning
nevyn Dec 17, 2020
6e59652
Merge branch 'miniaudio-capture2' into alloverse-miniaudio2
nevyn Jan 25, 2021
02a9b02
oops, use capture device for capture, not playback
nevyn Jan 25, 2021
a150c83
Merge branch 'miniaudio-capture2' into alloverse-miniaudio2
nevyn Jan 25, 2021
8e98e99
Fix arr_splice;
bjornbytes Feb 4, 2021
6612c7b
Add back the alpha in pbr shader
Voxar Mar 15, 2021
15afa29
Fix OpenXR hand tracking on Quest;
bjornbytes Mar 1, 2021
0a51d21
Fix standard shader precision issues;
bjornbytes Mar 28, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 0 additions & 4 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,3 @@ bin
.DS_Store
.vs
/test
deps/VrApi
deps/pico
deps/openxr
deps/OpenXR-Oculus
14 changes: 10 additions & 4 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
url = https://github.com/lsalzman/enet
[submodule "deps/glfw"]
path = deps/glfw
url = https://github.com/glfw/glfw
url = https://github.com/alloverse/glfw
[submodule "deps/lua"]
path = deps/lua
url = https://github.com/LuaDist/lua
Expand All @@ -13,15 +13,21 @@
[submodule "deps/ode"]
path = deps/ode
url = https://github.com/bjornbytes/ode
[submodule "deps/openal-soft"]
path = deps/openal-soft
url = https://github.com/kcat/openal-soft
[submodule "deps/openvr"]
path = deps/openvr
url = https://github.com/ValveSoftware/openvr
[submodule "deps/luajit"]
path = deps/luajit
url = https://github.com/WohlSoft/LuaJIT
[submodule "deps/oculus-mobile"]
path = deps/oculus-mobile
url = https://github.com/alloverse/ovr_sdk_mobile
[submodule "deps/pico"]
path = deps/pico
url = https://github.com/alloverse/pico_native_sdk
[submodule "deps/oculus-pc"]
path = deps/oculus-pc
url = https://github.com/alloverse/ovr_sdk_pc.git
[submodule "deps/openxr"]
path = deps/openxr
url = https://github.com/khronosgroup/openxr-sdk
71 changes: 25 additions & 46 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
cmake_minimum_required(VERSION 3.1.0)
cmake_policy(SET CMP0063 NEW)
cmake_policy(SET CMP0042 NEW)
project(lovr)

# Options
Expand All @@ -21,7 +22,11 @@ option(LOVR_USE_LUAJIT "Use LuaJIT instead of Lua" ON)
option(LOVR_USE_OPENVR "Enable the OpenVR backend for the headset module" ON)
option(LOVR_USE_OPENXR "Enable the OpenXR backend for the headset module" OFF)
option(LOVR_USE_WEBXR "Enable the WebXR backend for the headset module" OFF)
option(LOVR_USE_OCULUS "Enable the LibOVR backend for the headset module (be sure to also set LOVR_OCULUS_PATH to point to the Oculus SDK)" OFF)
if(WIN32)
option(LOVR_USE_OCULUS "Enable the LibOVR backend for the headset module (be sure to also set LOVR_OCULUS_PATH to point to the Oculus SDK)" ON)
else()
option(LOVR_USE_OCULUS "Enable the LibOVR backend for the headset module (be sure to also set LOVR_OCULUS_PATH to point to the Oculus SDK)" OFF)
endif()
option(LOVR_USE_VRAPI "Enable the VrApi backend for the headset module" OFF)
option(LOVR_USE_PICO "Enable the Pico backend for the headset module" OFF)
option(LOVR_USE_DESKTOP_HEADSET "Enable the keyboard/mouse backend for the headset module" ON)
Expand All @@ -31,7 +36,6 @@ option(LOVR_SYSTEM_ENET "Use the system-provided enet" OFF)
option(LOVR_SYSTEM_GLFW "Use the system-provided glfw" OFF)
option(LOVR_SYSTEM_LUA "Use the system-provided Lua" OFF)
option(LOVR_SYSTEM_ODE "Use the system-provided ODE" OFF)
option(LOVR_SYSTEM_OPENAL "Use the system-provided OpenAL" OFF)
option(LOVR_SYSTEM_OPENXR "Use the system-provided OpenXR" OFF)

option(LOVR_BUILD_EXE "Build an executable (or an apk on Android)" ON)
Expand Down Expand Up @@ -110,7 +114,7 @@ endif()
# Lua
if(LOVR_USE_LUAJIT AND NOT EMSCRIPTEN)
if (APPLE)
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -pagezero_size 10000 -image_base 100000000")
set(LUAJIT_ENABLE_GC64 ON)
endif()
if(LOVR_SYSTEM_LUA)
pkg_search_module(LUAJIT REQUIRED luajit)
Expand Down Expand Up @@ -172,35 +176,6 @@ if(LOVR_ENABLE_PHYSICS)
endif()
endif()

# OpenAL
if(LOVR_ENABLE_AUDIO)
if(LOVR_SYSTEM_OPENAL)
pkg_search_module(OPENAL openal-soft)
if (NOT OPENAL_FOUND)
pkg_search_module(OPENAL openal)
if (NOT OPENAL_FOUND)
message(FATAL_ERROR "OpenAL not found.")
endif()
endif()
include_directories(${OPENAL_INCLUDE_DIRS})
string(REPLACE ";" " " OPENAL_LDFLAGS_STR "${OPENAL_LDFLAGS}")
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${OPENAL_LDFLAGS_STR}")
set(LOVR_OPENAL ${OPENAL_LIBRARIES})
else()
set(ALSOFT_UTILS OFF CACHE BOOL "")
set(ALSOFT_EXAMPLES OFF CACHE BOOL "")
set(ALSOFT_TESTS OFF CACHE BOOL "")
if(NOT EMSCRIPTEN)
add_subdirectory(deps/openal-soft openal)
set(LOVR_OPENAL OpenAL)
if(WIN32)
set_target_properties(OpenAL PROPERTIES COMPILE_FLAGS "/wd4005 /wd4098")
endif()
endif()
include_directories(deps/openal-soft/include)
endif()
endif()

# OpenGL
if(NOT (WIN32 OR EMSCRIPTEN OR ANDROID))
find_package(OpenGL REQUIRED)
Expand Down Expand Up @@ -256,9 +231,7 @@ endif()

# Oculus SDK -- expects Oculus SDK 1.26.0 or later
if(LOVR_ENABLE_HEADSET AND LOVR_USE_OCULUS)
if(NOT LOVR_OCULUS_PATH)
message(FATAL_ERROR "LOVR_USE_OCULUS requires the LOVR_OCULUS_PATH to be set to the location of the Oculus Desktop SDK (LibOVR) folder")
endif()
set(LOVR_OCULUS_PATH "${CMAKE_CURRENT_SOURCE_DIR}/deps/oculus-pc" CACHE STRING "location of the Oculus Desktop SDK folder")
set(OCULUS_BUILD_TYPE "Release")
if(CMAKE_SIZEOF_VOID_P EQUAL 8)
set(OCULUS_ARCH "x64")
Expand All @@ -267,12 +240,12 @@ if(LOVR_ENABLE_HEADSET AND LOVR_USE_OCULUS)
endif()
include_directories("${LOVR_OCULUS_PATH}/LibOVR/Include")
link_directories("${LOVR_OCULUS_PATH}/LibOVR/Lib/Windows/${OCULUS_ARCH}/${OCULUS_BUILD_TYPE}/VS2017")
set(LOVR_OCULUS LibOVR)
set(LOVR_OCULUS "${LOVR_OCULUS_PATH}/LibOVR/Lib/Windows/${OCULUS_ARCH}/${OCULUS_BUILD_TYPE}/VS2017/LibOVR.lib")
endif()

# VrApi (Oculus Mobile SDK) -- tested on 1.34.0
if(LOVR_ENABLE_HEADSET AND LOVR_USE_VRAPI)
set(LOVR_VRAPI_PATH "${CMAKE_CURRENT_SOURCE_DIR}/deps/VrApi" CACHE STRING "The path to the VrApi folder of the Oculus Mobile SDK")
set(LOVR_VRAPI_PATH "${CMAKE_CURRENT_SOURCE_DIR}/deps/oculus-mobile/VrApi" CACHE STRING "The path to the VrApi folder of the Oculus Mobile SDK")
add_library(VrApi SHARED IMPORTED)
include_directories("${LOVR_VRAPI_PATH}/Include")
set_target_properties(VrApi PROPERTIES IMPORTED_LOCATION "${LOVR_VRAPI_PATH}/Libs/Android/${ANDROID_ABI}/Release/libvrapi.so")
Expand All @@ -281,7 +254,7 @@ endif()

# Pico Native SDK (1.3.3)
if(LOVR_ENABLE_HEADSET AND LOVR_USE_PICO)
set(LOVR_PICO_PATH "${CMAKE_CURRENT_SOURCE_DIR}/deps/pico" CACHE STRING "The path to the Pico SDK folder (unzipped aar)")
set(LOVR_PICO_PATH "${CMAKE_CURRENT_SOURCE_DIR}/deps/pico/aar" CACHE STRING "The path to the Pico SDK folder (unzipped aar)")
add_library(Pvr_NativeSDK SHARED IMPORTED)
set_target_properties(Pvr_NativeSDK PROPERTIES IMPORTED_LOCATION "${LOVR_PICO_PATH}/jni/${ANDROID_ABI}/libPvr_NativeSDK.so")
set(LOVR_PICO Pvr_NativeSDK)
Expand Down Expand Up @@ -338,8 +311,10 @@ if(LOVR_USE_PICO)
endif()

if(LOVR_BUILD_SHARED)
add_definitions(-DLOVR_BUILDING_SHARED)
add_library(lovr SHARED ${LOVR_SRC})
elseif(LOVR_BUILD_EXE)
add_definitions(-DLOVR_BUILDING_EXE)
add_executable(lovr ${LOVR_SRC})
else()
return()
Expand All @@ -354,7 +329,6 @@ target_link_libraries(lovr
${LOVR_LUA}
${LOVR_MSDF}
${LOVR_ODE}
${LOVR_OPENAL}
${LOVR_OPENGL}
${LOVR_OPENVR}
${LOVR_OPENXR}
Expand All @@ -369,16 +343,16 @@ if(LOVR_ENABLE_AUDIO)
add_definitions(-DLOVR_ENABLE_AUDIO)
target_sources(lovr PRIVATE
src/modules/audio/audio.c
src/modules/audio/spatializers/dummy_spatializer.c
src/api/l_audio.c
src/api/l_audio_source.c
src/api/l_audio_microphone.c
src/lib/miniaudio/miniaudio.c
)
endif()

if(LOVR_ENABLE_DATA)
add_definitions(-DLOVR_ENABLE_DATA)
target_sources(lovr PRIVATE
src/modules/data/audioStream.c
src/modules/data/blob.c
src/modules/data/modelData.c
src/modules/data/modelData_gltf.c
Expand All @@ -387,7 +361,6 @@ if(LOVR_ENABLE_DATA)
src/modules/data/soundData.c
src/modules/data/textureData.c
src/api/l_data.c
src/api/l_data_audioStream.c
src/api/l_data_blob.c
src/api/l_data_modelData.c
src/api/l_data_rasterizer.c
Expand Down Expand Up @@ -560,7 +533,6 @@ if(WIN32)
move_dll(${LOVR_GLFW})
move_dll(${LOVR_LUA})
move_dll(${LOVR_ODE})
move_dll(${LOVR_OPENAL})
move_dll(${LOVR_OPENVR})
move_dll(${LOVR_MSDF})
target_compile_definitions(lovr PRIVATE -DLOVR_GL)
Expand All @@ -582,7 +554,6 @@ elseif(APPLE)
move_lib(${LOVR_GLFW})
move_lib(${LOVR_LUA})
move_lib(${LOVR_ODE})
move_lib(${LOVR_OPENAL})
move_lib(${LOVR_OPENVR})
move_lib(${LOVR_MSDF})

Expand All @@ -591,6 +562,7 @@ elseif(APPLE)
MACOSX_BUNDLE TRUE
MACOSX_RPATH TRUE
BUILD_WITH_INSTALL_RPATH TRUE
INSTALL_NAME_DIR "@rpath"
INSTALL_RPATH "@executable_path"
MACOSX_BUNDLE_INFO_PLIST "${CMAKE_CURRENT_SOURCE_DIR}/src/resources/Info.plist"
RESOURCE "${CMAKE_CURRENT_SOURCE_DIR}/src/resources/lovr.icns"
Expand All @@ -600,13 +572,13 @@ elseif(EMSCRIPTEN)
target_sources(lovr PRIVATE src/core/os_web.c)
target_compile_definitions(lovr PRIVATE -DLOVR_WEBGL)
elseif(ANDROID)
target_link_libraries(lovr log EGL GLESv3 android)
target_link_libraries(lovr log EGL GLESv3 OpenSLES android)
target_compile_definitions(lovr PRIVATE -DLOVR_GLES)
target_include_directories(lovr PRIVATE "${ANDROID_NDK}/sources/android/native_app_glue")

# Dynamically linked targets output libraries in lib/<ABI> for easy including in apk with aapt
set_target_properties(
lovr ${LOVR_ODE} ${LOVR_OPENAL}
lovr ${LOVR_ODE}
PROPERTIES LIBRARY_OUTPUT_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/lib/${ANDROID_ABI}"
)

Expand Down Expand Up @@ -658,6 +630,10 @@ elseif(ANDROID)
set(ANDROID_APKSIGNER_KEYSTORE_PASS --ks-pass)
endif()

if (ANDROID_EXTRAPACKAGES) # Only pass --extra-packages if var is set
set(ANDROID_EXTRAPACKAGES --extra-packages ${ANDROID_EXTRAPACKAGES})
endif()

# Make an apk
add_custom_target(
buildAPK ALL
Expand All @@ -672,6 +648,7 @@ elseif(ANDROID)
-M AndroidManifest.xml
-I ${ANDROID_JAR}
-F lovr.unaligned.apk
${ANDROID_EXTRAPACKAGES}
${ANDROID_ASSETS}
COMMAND
${ANDROID_TOOLS}/aapt
Expand All @@ -682,10 +659,12 @@ elseif(ANDROID)
sign
--ks ${ANDROID_KEYSTORE}
${ANDROID_APKSIGNER_KEYSTORE_PASS} ${ANDROID_KEYSTORE_PASS}
$<$<BOOL:${ANDROID_KEY_PASS}>:--key-pass> $<$<BOOL:${ANDROID_KEY_PASS}>:${ANDROID_KEY_PASS}>
--in lovr.unsigned.apk
--out lovr.apk
COMMAND ${CMAKE_COMMAND} -E remove lovr.unaligned.apk lovr.unsigned.apk AndroidManifest.xml Activity.java classes.dex
COMMAND ${CMAKE_COMMAND} -E remove_directory org
DEPENDS lovr
)
endif()
elseif(UNIX)
Expand Down
3 changes: 2 additions & 1 deletion Tupfile
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ SRC += src/core/util.c
SRC += src/core/zip.c

# modules
SRC_@(AUDIO) += src/modules/audio/*.c
SRC_@(AUDIO) += src/modules/audio/audio.c
SRC_@(DATA) += src/modules/data/*.c
SRC_@(EVENT) += src/modules/event/*.c
SRC_@(FILESYSTEM) += src/modules/filesystem/*.c
Expand All @@ -38,6 +38,7 @@ SRC_@(TIMER) += src/modules/timer/*.c
SRC += src/lib/stb/*.c
SRC_@(DATA) += src/lib/jsmn/jsmn.c
SRC_@(GRAPHICS) += src/lib/glad/glad.c
SRC_@(AUDIO) += src/lib/miniaudio/miniaudio.c
SRC_@(MATH) += src/lib/noise1234/noise1234.c
SRC_@(THREAD) += src/lib/tinycthread/tinycthread.c

Expand Down
2 changes: 1 addition & 1 deletion deps/glfw
Submodule glfw updated 78 files
+0 −5 .appveyor.yml
+1 −4 .gitignore
+29 −21 .travis.yml
+0 −0 CMake/glfw3.pc.in
+0 −0 CMake/glfw3Config.cmake.in
+0 −26 CMake/modules/FindWaylandProtocols.cmake
+0 −34 CMake/modules/FindXKBCommon.cmake
+21 −70 CMakeLists.txt
+75 −3 README.md
+133 −86 deps/linmath.h
+430 −191 deps/nuklear.h
+4 −4 deps/nuklear_glfw_gl2.h
+2 −0 docs/CMakeLists.txt
+1 −1 docs/CODEOWNERS
+1,604 −934 docs/Doxyfile.in
+64 −102 docs/build.dox
+13 −15 docs/compat.dox
+1 −2 docs/compile.dox
+0 −4 docs/context.dox
+1 −1 docs/extra.css
+1 −0 docs/extra.css.map
+110 −94 docs/extra.scss
+3 −2 docs/header.html
+5 −5 docs/input.dox
+35 −12 docs/intro.dox
+2 −2 docs/moving.dox
+65 −0 docs/news.dox
+35 −32 docs/quick.dox
+8 −3 docs/vulkan.dox
+43 −15 docs/window.dox
+4 −1 examples/CMakeLists.txt
+1 −0 examples/offscreen.c
+32 −84 examples/windows.c
+133 −43 include/GLFW/glfw3.h
+113 −42 src/CMakeLists.txt
+31 −7 src/cocoa_init.m
+0 −4 src/cocoa_joystick.h
+10 −14 src/cocoa_joystick.m
+28 −6 src/cocoa_monitor.m
+13 −6 src/cocoa_platform.h
+140 −44 src/cocoa_window.m
+67 −13 src/egl_context.c
+33 −21 src/egl_context.h
+9 −0 src/init.c
+47 −0 src/input.c
+20 −4 src/internal.h
+46 −51 src/linux_joystick.c
+0 −3 src/linux_joystick.h
+1 −1 src/nsgl_context.m
+5 −0 src/null_init.c
+9 −0 src/null_joystick.c
+84 −2 src/null_monitor.c
+35 −8 src/null_platform.h
+361 −23 src/null_window.c
+0 −4 src/osmesa_context.h
+4 −0 src/vulkan.c
+0 −4 src/wgl_context.h
+2 −3 src/win32_init.c
+36 −38 src/win32_joystick.c
+0 −3 src/win32_joystick.h
+2 −0 src/win32_monitor.c
+12 −9 src/win32_platform.h
+259 −147 src/win32_window.c
+27 −9 src/window.c
+14 −9 src/wl_init.c
+2 −2 src/wl_monitor.c
+0 −5 src/wl_platform.h
+66 −20 src/wl_window.c
+526 −143 src/x11_init.c
+18 −8 src/x11_monitor.c
+347 −7 src/x11_platform.h
+191 −95 src/x11_window.c
+4 −6 tests/CMakeLists.txt
+158 −82 tests/glfwinfo.c
+2 −0 tests/monitors.c
+0 −109 tests/opacity.c
+46 −142 tests/triangle-vulkan.c
+417 −0 tests/window.c
2 changes: 1 addition & 1 deletion deps/luajit
Submodule luajit updated 215 files
1 change: 1 addition & 0 deletions deps/oculus-mobile
Submodule oculus-mobile added at 50a3e4
1 change: 1 addition & 0 deletions deps/oculus-pc
Submodule oculus-pc added at 6ee999
1 change: 0 additions & 1 deletion deps/openal-soft
Submodule openal-soft deleted from 9c5307
1 change: 1 addition & 0 deletions deps/pico
Submodule pico added at 418d31
3 changes: 2 additions & 1 deletion src/api/api.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ LOVR_EXPORT int luaopen_lovr_math(lua_State* L);
LOVR_EXPORT int luaopen_lovr_physics(lua_State* L);
LOVR_EXPORT int luaopen_lovr_thread(lua_State* L);
LOVR_EXPORT int luaopen_lovr_timer(lua_State* L);
extern const luaL_Reg lovrModules[];
LOVR_EXPORT extern const luaL_Reg lovrModules[];

// Objects
extern const luaL_Reg lovrAudioStream[];
Expand Down Expand Up @@ -96,6 +96,7 @@ extern StringEntry lovrStencilAction[];
extern StringEntry lovrTextureFormat[];
extern StringEntry lovrTextureType[];
extern StringEntry lovrTimeUnit[];
extern StringEntry lovrSampleFormat[];
extern StringEntry lovrUniformAccess[];
extern StringEntry lovrVerticalAlign[];
extern StringEntry lovrWinding[];
Expand Down
Loading