Commit Graph

2119 Commits

Author SHA1 Message Date
bjorn 3dc4d06285 Fix eye enum; 2019-05-22 14:37:46 -07:00
bjorn 698466d19c Add missing include in animator.h; 2019-05-21 00:32:20 -07:00
bjorn 5b1e281d4c Switch to a fork of LuaJIT that supports android; 2019-05-21 00:26:21 -07: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 e4c32d2f08 Fix oculus_mobile api.h include; 2019-05-20 15:17:38 -07:00
bjorn e87b81e34a Fix android platform include order; 2019-05-20 15:16:27 -07:00
bjorn a9972a88de Fix oculus_mobile_bridge include path; 2019-05-20 15:15:10 -07:00
bjorn e8a8f6718e Fix vrapi_getAxis; 2019-05-20 15:13:05 -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 57aad490ae Start sized int conversions; 2019-05-20 14:34:03 -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 b1e848ef6b Cleanup filesystem module; 2019-05-20 03:51:22 -07:00
bjorn 1335ab55ae Warnings/cleanup; 2019-05-20 03:41:12 -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 79ba7a7ad5 gltf: Support partially-keyed animation properties; 2019-05-18 22:19:28 -07:00
bjorn 8d1b335da4 More mapping fixes; 2019-05-18 21:34:36 -07:00
bjorn 440b30df59 Add filter/wrap to default texture; 2019-05-18 04:33:28 -07:00
bjorn 1792f066f2 Fix CMakeLists; Fix buffer unmapping; Formatting; 2019-05-18 01:09:06 -07:00
bjorn e3e52a7808 Fix issue when animated model has no animator; 2019-05-18 00:30:43 -07:00
bjorn 976d59e364 Undo single-translation-unit experiment for now; 2019-05-17 16:29:24 -07:00
bjorn 6f7c30e7e2 Single-translation-unit experiment; 2019-05-15 12:05:56 -07:00
bjorn 1aef9963f5 Clean up thread module; 2019-05-14 04:43:38 -07:00
bjorn a4e563fe6f Clean up event module; 2019-05-14 04:37:56 -07:00
bjorn 3267bad4fa Add ShaderFlags;
newShader and newComputeShader accept an optional options table
that can contain a table of flags.  Flags are turned into #defines
in the shader source and can be used as specialization constants in
the future.

Currently they can only be bools and ints.  This might change to add
float and/or remove bools.
2019-05-14 03:48:01 -07:00
bjorn 6134abe866 Handle vsync better;
- Add vsync flag to t.window and lovr.graphics.createWindow.
- vsync is 1 by default.
- Some headset drivers override vsync if they have special timing requirements.
2019-05-14 00:18:22 -07:00
bjorn 15c4b6fcd2 Fix me ifdefs; 2019-05-13 20:52:11 -07:00
bjorn f786c40b4e Rework Buffer updates;
Use unsynchronized mapped buffers on macOS.

Reduce amount of Buffer flushes and stalls by flushing once per
batch instead of once per draw.
2019-05-13 20:35:21 -07:00
bjorn b8ed63fcc4 Fix double/float conversions; 2019-05-13 04:28:57 -07:00
bjorn 566cd20984 Cleanup; 2019-05-13 04:25:34 -07:00
bjorn 69260cfbb3 openvr: rm state.rift;
Yay actions?
2019-05-13 04:25:34 -07:00
bjorn 8e7a4323d0 rm custom PI define; 2019-05-13 03:56:34 -07:00
bjorn 83b8ee2d08 Audio cleanup; 2019-05-13 03:53:17 -07:00
bjorn 97e3774718 Make TimerState private; 2019-05-13 03:35:41 -07:00
bjorn 963f496ac1 Lua hides a Type in its userdata; 2019-05-13 03:21:11 -07:00
bjorn 429efcb38d Change circle size argument from diameter to radius; 2019-05-12 23:34:04 -07:00
bjorn 51ce0c1418 rm compat; 2019-05-12 22:28:02 -07:00
bjorn 7c2a119324 SteamVR Input 2019-05-12 22:23:28 -07:00
bjorn c20554645e Initial KTX support; 2019-05-12 22:23:28 -07:00
bjorn 5b0fa8b522 Fix warnings; 2019-05-12 22:23:28 -07:00
bjorn 9a1579a773 Ensure maf symbols are exported on unix; 2019-05-12 22:23:28 -07:00
bjorn db3c3dbb1e Fix lovr.headset.hands; 2019-05-12 22:23:28 -07:00
bjorn ebcdc6d36e Ensure bone pose gets reset when not animating; 2019-05-12 22:23:28 -07:00
bjorn 28c453075a Fix batching overflow; 2019-05-12 22:23:28 -07:00
bjorn 511afef0c6 Fix batching issue with non-instanced primitives; 2019-05-12 22:23:28 -07:00
bjorn 6ff35420bd More leap fixes;
Also reduce branching in headset accessors.
2019-05-12 22:23:28 -07:00
bjorn 06b8b6f405 Leap fixes; 2019-05-12 22:23:28 -07:00
bjorn 26c1859531 Update WebVR; 2019-05-12 22:23:28 -07:00
bjorn 9382afb94d Put controller models back on nogame screen; 2019-05-12 22:23:08 -07:00
bjorn 2ecae65925 trackpad -> touchpad;
Sorry
2019-05-12 22:23:02 -07:00
bjorn 57321db2cd lovr.headset.getDriver accepts devices; 2019-05-12 22:23:02 -07:00
bjorn 5413f6a427 Device iterators; 2019-05-12 22:23:02 -07:00
bjorn 7807b1abd7 lovr.headset.getAcceleration, getAngularAcceleration;
Add missing getBonePose impls.

Refactor some ovr stuff.
2019-05-12 22:23:02 -07:00
bjorn b6e1e5e3b0 lovr.headset.getBonePose; Device shorthands; 2019-05-12 22:23:02 -07:00
bjorn 05f4ba7342 Change everything;
Use enums because they make things easier.
2019-05-12 22:23:02 -07:00
bjorn 1d079f0c95 Fix desktop_isDown; 2019-05-12 22:23:02 -07:00
bjorn e21b64155a Re-prefix headset backend function names; 2019-05-12 22:23:02 -07:00
bjorn 89ccf750ba Start compat system; 2019-05-12 22:23:02 -07:00
bjorn 4b3e72a5f1 Fix warnings; 2019-05-12 22:22:29 -07:00
bjorn 2aace190fe Add oculus:getDisplayTime; 2019-05-12 22:22:29 -07:00
bjorn 5947a96556 Fix getDisplayTime prototype; 2019-05-12 22:22:29 -07:00
bjorn c2fc7daf2d Split mat4_getTransform; 2019-05-12 22:22:29 -07:00
bjorn 801f997b0a Use vectors for headset pose accessors; 2019-05-12 22:22:29 -07:00
bjorn 344edd8c30 Add missing OpenXR string constant; 2019-05-12 22:22:29 -07:00
bjorn dafa7fefbe Fix setTransform; 2019-05-12 22:22:29 -07:00
bjorn 5ff8e51d88 Add openxr:getDisplayTime; 2019-05-12 22:22:29 -07:00
bjorn ed725927c3 OpenXR headset backend; 2019-05-12 22:22:29 -07:00
bjorn aa1d33669c Just use leap; 2019-05-12 22:22:29 -07:00
bjorn e22d98e09e Finish Leap backend; 2019-05-12 22:22:29 -07:00
bjorn 5ff49e73c2 Leap WIP; 2019-05-12 22:22:29 -07:00
bjorn 400598735c rm isTracked for now; 2019-05-12 22:22:29 -07:00
bjorn df5de9a35e Use strings for paths;
It's probably slower, but it's way less complicated, so it seems like
a win for now.  Can implement compile-time hashing, tries etc. later
if it's identified as a performance issue for a real person.

Also a bunch of cleanup in openvr.c and oculus.c.
2019-05-12 22:22:29 -07:00
bjorn 45931d005a lovr.headset.isTracked; 2019-05-12 22:22:29 -07:00
bjorn bb06b211cd Add missing getDirection binding; 2019-05-12 22:22:29 -07:00
bjorn 5c6163580b rm unused headset.h; 2019-05-12 22:22:29 -07:00
bjorn d8581106d4 Support Vive trackers again;
/trackers/1
2019-05-12 22:22:29 -07:00
bjorn ca30991b2a "VR Simulator" -> "Simulator"; 2019-05-12 22:22:29 -07:00
bjorn 85d461e71c Fixup lovr.headset.getName; 2019-05-12 22:22:29 -07:00
bjorn 50e77fc023 Combine getVelocity and getAngularVelocity impls; 2019-05-12 22:22:29 -07:00
bjorn a9ef3656a1 lovr.headset.getDirection; 2019-05-12 22:22:29 -07:00
bjorn 965f39f834 Do less work in lovr.headset.getPosition/getOrientation; 2019-05-12 22:22:29 -07:00
bjorn 9a8b119a81 Add missing enum; 2019-05-12 22:22:29 -07:00
bjorn 42ba6ddbb9 oculus_mobile build fixes; 2019-05-12 22:22:29 -07:00
bjorn 7a5ae2bfe1 Update oculus_mobile backend; 2019-05-12 22:22:29 -07:00
bjorn 77f848ea8f Update oculus backend; 2019-05-12 22:22:29 -07:00
bjorn f5b976cfae Actually read paths in API; 2019-05-12 22:22:29 -07:00
bjorn e406678b1c rm luax_pushpath; 2019-05-12 22:22:29 -07:00
bjorn 2584809c23 Reorganize path enum; 2019-05-12 22:22:29 -07:00
bjorn 4edb8de0b0 Shorten path enum prefix; 2019-05-12 22:22:29 -07:00
bjorn 86537141ac Add eye path; 2019-05-12 22:22:29 -07:00
bjorn b42c3ffc0e Rename hands to hand; 2019-05-12 22:22:29 -07:00
bjorn 6182ce59af Cleanup; 2019-05-12 22:22:29 -07:00
bjorn 4e8d64a1a3 Cleanup; 2019-05-12 22:22:29 -07:00
bjorn 60d2111937 Add proximity to Subpaths; 2019-05-12 22:22:29 -07:00
bjorn 87d3c2742c Drop static function prefixes; 2019-05-12 22:22:29 -07:00
bjorn b0067233f7 getType -> getName; 2019-05-12 22:22:29 -07:00
bjorn b9c5dce584 re-add proximity sensor button; 2019-05-12 22:22:29 -07:00
bjorn fd985c95ff rm isMounted; 2019-05-12 22:22:29 -07:00
bjorn da6fd4d07c Remove Controllers; 2019-05-12 22:22:29 -07:00
bjorn bd609fc338 rm Controller:getHand; 2019-05-12 22:21:06 -07:00
bjorn cb0a40a4b6 lovr.headset.isDown; lovr.headset.isTouched; 2019-05-12 22:21:06 -07:00
bjorn 45757f2fa3 Fixes; 2019-05-12 22:21:06 -07:00
bjorn b95280006a lovr.headset.newModel; 2019-05-12 22:21:06 -07:00
bjorn cb79973b98 lovr.headset.vibrate;
Signature changed to take strength, duration, and frequency.  All
are optional.
2019-05-12 22:21:06 -07:00
bjorn 36e4529dca lovr.headset.getAxis;
Takes a path and returns 1-3 float values representing the components
of the axis at the path.  The "touchx" and "touchy" axes are now just
"touchpad".
2019-05-12 22:21:06 -07:00
bjorn 5ab8904809 Controller polyfill; rm Controller pose functions; OpenVR paths; 2019-05-12 22:21:06 -07:00
bjorn f87b4e6a25 Read paths; Desktop driver uses paths; 2019-05-12 22:21:06 -07:00
bjorn 48cf7e1874 Start paths; 2019-05-12 22:21:06 -07:00
bjorn 8208238df7 Support multiple tracking drivers;
Now the lovr.headset module initializes one display driver (the
first one in the list) and multiple tracking drivers.  Only drivers
that implement 'renderTo' will be considered for display driver.

Tracking drivers are stored in a linked list, and retrieving pose
information involves trying all of the tracking drivers until the
pose is found.
2019-05-12 22:21:06 -07:00
bjorn c95c0afb4c Set alpha sampling to false in lovr.graphics.reset; 2019-05-08 20:09:42 -07:00
bjorn c9775c84ac Remove t.gammacorrect flag;
Gamma correct rendering is core in all supported OpenGL versions,
and it's usually a good idea to enable it.
2019-05-03 17:53:33 -07:00
bjorn 594921d2ec newThread: can load thread code from a file or Blob;
Also fix a lifetime issue: If the string containing thread code was
garbage collected before you started the thread, you would have been
running free'd memory as Lua code!
2019-05-02 15:09:54 -07:00
bjorn 0e0cfee6e8 Font:getWidth returns lineCount; 2019-04-27 11:13:37 -07:00
bjorn 7eff3d7d4c rm platform include; 2019-04-23 15:26:45 -07:00
bjorn 8af82d3bc1 Handle mipMapCount = 0 in DDS textures; 2019-04-23 15:25:31 -07:00
bjorn afc8000fc7 rm stddef from util; 2019-04-21 11:52:04 -07:00
bjorn c021afedae Fix more warnings; 2019-04-20 18:42:25 -07:00
bjorn 7af5b9816a Stupid float stuff;
I'm sorry.
2019-04-20 17:02:48 -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 b95c97ff57 rm unused mat4_setTransform function; 2019-04-20 14:15:43 -07:00
bjorn 0341233876 Also support hexcodes in lovr.graphics.clear; 2019-04-20 13:38:09 -07:00
bjorn c247682653 BRING BACK HEXCODES; 2019-04-20 13:36:36 -07:00
bjorn f268810d2a Minor cleanup; Fix some undefined behavior; 2019-04-20 13:11:11 -07:00
bjorn ec7b2c0b68 Formatting; 2019-04-20 12:07:26 -07:00
bjorn ec7afed2cb Update one trailing reference to lib/math.h;
In a comment...
2019-04-20 11:41:29 -07:00
bjorn 196b4ed010 Rename math to maf;
It's funnier and more compatible with some compiler setups,
since it won't get confused with the system <math.h>.
2019-04-20 11:39:20 -07:00
bjorn 26435be7ac Fix batching edge case; 2019-04-14 13:47:02 -07:00
bjorn 9d90e83657 Fix Mesh attribute normalization;
Normalize i8 and u8 attribute by default.

Forward attribute normalization from glTF accessors.
2019-04-13 16:08:58 -07:00
bjorn ed92c4e6db font:setFlipEnabled(false) in lovr.errhand;
To prevent text from being upside down if you flipped the default font.
2019-04-13 15:40:47 -07:00
bjorn 44be3608a7 lovr.headset.getDirection; Controller:getDirection; 2019-04-12 15:08:45 -07:00
bjorn 9131c26fab Fix Android build; 2019-04-11 15:26:59 -07:00
bjorn c89a7139ee Add File to the types table; 2019-04-11 15:20:21 -07:00
bjorn 1e05799669 More conservative buffer locking; 2019-04-11 08:35:55 -07:00
bjorn ee8fdb773d Add missing Texture release in OpenGL state backdoor; 2019-04-08 05:19:39 -07:00
bjorn 59e4a5bb8e Oops, re-enable graphics module in boot.lua;
Also change format of message.
2019-04-08 05:18:28 -07:00
bjorn 0f6bcad90b Nogame screen works without the graphics module; 2019-04-08 03:25:45 -07:00
bjorn 0139486f46 Fix misc builds; 2019-04-05 06:07:46 -07:00
bjorn 6e75ebafac Fix windows build; 2019-04-05 06:01:12 -07:00
bjorn fa4f240b7b Fix plane uv argument parsing; 2019-04-05 05:50:43 -07:00
bjorn 011db5f1e5 Revert "Free objects in their destructors;"
This reverts commit d31dca5520.

We can't unconditionally free because sometimes objects are temporarily
allocated on the stack.
2019-04-05 05:45:05 -07:00
bjorn a5891bad92 lovr.graphics.plane uv arguments; 2019-04-05 05:34:28 -07:00
bjorn 0b62960472 Use lovrVariantDestroy in lovrChannelClear; 2019-04-05 05:15:17 -07:00
bjorn 32f73bcbf5 Add missing struct tag; 2019-04-05 05:13:09 -07:00
bjorn 5e74222a48 rm types from util; 2019-04-05 05:12:21 -07:00
bjorn c20c94b3e1 thread: forward declarations; 2019-04-05 05:11:49 -07:00