Commit Graph

395 Commits

Author SHA1 Message Date
bjorn 2f9400a5f7 Adjust includes; 2019-12-10 13:01:28 -08:00
bjorn b518a4c983 rm misc physfs; 2019-12-10 12:38:06 -08:00
bjorn 403ed8d3b0 Windows; 2019-12-10 12:19:50 -08:00
bjorn 488c125c5f Draw the rest of the owl; 2019-12-10 12:19:50 -08:00
bjorn d2b0b30faf Texture:encode doesn't use File; 2019-12-10 12:19:50 -08:00
bjorn bc948e7ea5 rm trailing whitespace; 2019-12-05 13:40:05 -08:00
bjorn bfd63e3515 Use restrict modifier in curve evaluation;
Allows compiler to emit SIMD, way smaller/faster.
2019-12-05 13:39:04 -08:00
bjorn c07b9e3fec rm unnecessary include; 2019-11-28 16:04:41 -08:00
bjorn 1030c01a35 Stop aligning pool memory;
It isn't necessary anymore since we aren't hiding data in the alignment
bits and it seems to be causing problems in wasm.
2019-11-28 15:59:04 -08:00
bjorn 3e347f0521 Properly initialize uniform.dirty; 2019-11-28 15:31:27 -08:00
bjorn 2ecc1c552f Fix uniform array hashing; 2019-11-26 11:34:39 -08:00
Bjorn 539e25897b
Merge pull request #157 from bjornbytes/shape-sensor
Shape:isSensor; Shape:setSensor;
2019-11-20 18:35:24 -08:00
bjorn c031c0c578 Fix comment; 2019-11-18 03:37:42 -08:00
bjorn bd169a4a4d Fix readable buffers;
Unsynchronized/invalidated mapping doesn't work if the read bit is set.
2019-11-14 12:42:52 -08:00
bjorn 13136482b9 Fix Channel memory leak;
Channels need to be removed from the global array/map when destroyed.

Note that this exposes an infinite loop in map_remove, which will
be fixed later.

Note also that Channel's are retained if they have any messages in
them, to prevent releasing a channel while it has pending messages.
2019-11-11 18:33:33 -08:00
bjorn a7e24ab28e Joint:isEnabled; Joint:setEnabled; 2019-11-11 16:39:02 -08:00
bjorn d21911d010 Add core/map hash table; rm lib/map; 2019-10-30 00:07:05 -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 b940f2d53f Add AABB to OBJ models; 2019-10-21 17:46:28 -07:00
Bjorn d7b3e1cf46
Merge pull request #160 from nevyn/fix/objc_msgsend_cast
Cast objc_msgSend before calling it
2019-10-15 13:12:19 -07:00
Bjorn 0bb3271bb5
Merge pull request #159 from nevyn/fake-controller-position
Desktop driver: Move left controller with mouse
2019-10-15 13:05:36 -07:00
Nevyn Bengtsson ab6e4891e1 Cast objc_msgSend before calling it
Calling objc_msgSend with its vararg signature will only work most
of the time, and fail very weirdly when it doesn't. It's weird,
but you're supposed to always cast it to the signature of the
selector you're calling.

I think this is even required when building on Catalina, or for arm64?
2019-10-15 22:00:15 +02:00
Nevyn Bengtsson e35a5435ca update leftHandTransform in desktop_update
to be consistent with how headTransform is calculated.

also, rename ‘transform’ to ‘headTransform’ for consistency.
2019-10-15 21:50:28 +02:00
bjorn 4d2aa81647 Reset active texture in lovrGpuInit; 2019-10-15 11:34:49 -07:00
bjorn d93e17e800 Texture:setCompareMode; Shadow samplers; 2019-10-14 17:12:34 -07:00
bjorn 25fa80f1d5 Fix comment; 2019-10-14 16:10:34 -07:00
bjorn c3f91e9ff3 Actually fix/test the issue with .lovr files on macOS apps; 2019-10-14 15:24:02 -07:00
Nevyn Bengtsson cb75b387e5 Desktop driver: Move left controller with mouse 2019-10-14 10:08:12 +02:00
bjorn ac441ec15b lovrGraphicsGetCamera; 2019-10-12 12:45:11 -07:00
bjorn b6093eda2a Shape:isSensor; Shape:setSensor; 2019-10-10 15:36:28 -07:00
bjorn 8c0ae3fbb3 More WebVR (controller) fixes; 2019-10-09 14:54:07 -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 c210d4e11d
Merge pull request #152 from bjornbytes/mac-bundle
Load .lovr files from the macOS app bundle;
2019-09-26 20:21:50 -07:00
bjorn 2e44926767 Cleanup; 2019-09-26 20:19:50 -07:00
bjorn f4c6e9bd12 oculus_mobile: set error callback based on current coroutine;
Currently:

- load/update/run/etc. take place on the boot.lua coroutine.
- draw happens "asynchronously" on the main thread.

When C needs to throw an error, it doesn't know which thread to
throw the error on.  If it throws it on the wrong thread, you get
a crash instead of an error screen.

One way to fix this is to change the error context based on the
thread that's currently running, so that errors in C are thrown
on the correct thread.  This is the approach that's taken here.

A potentially better approach would be to run all the code on the
same thread, but I ran into issues when I tried to do this.

It may also be possible to (ab)use the Lua panic handler to catch
errors on one of the threads and somehow forward them to the other.
2019-09-26 18:46:19 -07:00
Bjorn d23f2f5810
Merge pull request #151 from sophiabaldonado/oculus-mobile-fix-error-screen
Throw lua errors in the error handler
2019-09-26 18:44:05 -07:00
mcc dc92eb5c58 Oculus mobile vibrate() returns false on illicit second call; style changes 2019-09-26 19:32:12 -04:00
mcc 4a41f98562 Vibrate function for Oculus Quest, first pass
Only does "simple" vibrate (hard on/off). Supports duration but not frequency. Requires a corresponding commit in the lovr-oculus-mobile repo.
2019-09-26 18:40:04 -04:00
bjorn 0129a80b27 Load .lovr files from the macOS app bundle; 2019-09-24 21:37:44 -07:00
sophia ef84a16716 Throw lua errors in the error handler; 2019-09-24 12:04:36 -07:00
bjorn 403b217781 Fix Model destructor memory issues;
- Memory leaks.
- Freeing things that weren't allocated.
2019-09-20 13:46:27 -07:00
bjorn 2c29119e44 Fix non-interpolated cubic spline keyframe evaluation; 2019-09-19 23:01:50 -07:00
bjorn 1902787b1b Modify GPU timer API;
- lovr.graphics.tock returns the latest value of the timer, or 0.
- Timers are not in the stats table anymore.

This is to prepare for an upcoming internal change that affects timers.
2019-09-18 18:21:38 -07:00
bjorn e96c541244 Multithreaded builds on Windows; Formatting; 2019-09-18 16:12:08 -07:00
bjorn f82bcb703b Finalize skeletal input API; 2019-09-18 16:12:08 -07:00
mcc 785c7c722b Oculus mobile: Promote Lua print() statements to INFO
This means Lua print() statements can be uniquely filtered out vs anything else (because internal Lovr logging uses loglevel DEBUG and lovr errors use loglevel WARN).
2019-09-11 19:43:44 -04:00
bjorn 79b5d2962c Fix problem with vector lightuserdata handles; 2019-08-31 03:08:42 -07:00
bjorn 17ae64baec Fix sphere winding; 2019-08-31 03:00:40 -07:00
bjorn f97031a8ec Fix Android print with multiple arguments; 2019-08-26 16:19:58 -07:00
bjorn f64e2064ef Adjust Canvas padding so it's 128 bytes; 2019-08-23 01:43:35 -07:00
bjorn 80eaea21f1 Adjust Buffer padding so it's 48 bytes; 2019-08-23 01:35:46 -07:00
bjorn 8d8f4eef73 Adjust Texture padding so it's 64 bytes; 2019-08-23 01:34:23 -07:00
bjorn 28344928c9 Simplify arr; 2019-08-21 23:16:58 -07:00
bjorn 13655d0df4 Simplify logging; 2019-08-21 19:02:02 -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 3050d70f3d Slightly better OpenVR head pose; 2019-08-19 14:55:28 -07:00
bjorn 584261e21f rm ffi vectors; 2019-08-19 14:13:36 -07:00
bjorn e6bedba0bc Fix OpenVR head pose; 2019-08-17 22:50:35 -07:00
bjorn a4781c7013 Fix cylinder winding; 2019-08-12 20:03:32 -07:00
bjorn 948363e7df OpenGL: Enable seamless cubemap filtering;
It is always used in WebGL 2 and OpenGL ES 3.
2019-08-09 17:22:00 -07:00
bjorn 4d3bfea67c Model:getMaterial(name|index); rm Model:setMaterial; 2019-08-09 16:10:46 -07:00
bjorn bd773d2d6c Add materialMap to ModelData; 2019-08-09 15:14:22 -07:00
bjorn b5be93b94b Fix problem with falsy shader flags; 2019-08-07 15:56:13 -07:00
bjorn 54d58c79cd Fix issue where multiple shader flags don't work; 2019-08-06 14:38:49 -07:00
bjorn edd162052c Fix diffuse texture batching; 2019-08-06 11:38:12 -07:00
bjorn 96c47d590c rm lovrEnvironmentTexture from Material; 2019-08-05 15:20:17 -07:00
bjorn 017dd15c78 Update OpenXR to 1.0;
Still untested, gib runtimes pls.
2019-08-03 19:06:57 -07:00
bjorn aab987dbef Fix WebGL gamma correction;
Ugh, WebGL doesn't have sRGB backbuffers.
2019-08-01 13:26:45 -07:00
bjorn 7690db28af Windows: Fix all the int warnings; 2019-07-31 17:51:49 -07:00
bjorn c384d54aa5 OpenVR: Default haptic frequency to 1Hz; 2019-07-31 17:17:41 -07:00
bjorn 78f2060405 rm lovr.headset.getAcceleration, getAngularAcceleration;
Because OpenXR did...
2019-07-30 20:22:08 -07:00
bjorn 4b9e6849c8 Better boolean shader flags; Multicanvas flag;
Instead of boolean shader flags turning into actual booleans defines
in the shader source, for GLSL they turn into defines.  This lets you
use ifdef, which is the more common intended usage.

Also MULTICANVAS is now a boolean shader flag.  The old MULTICANVAS
define is deprecated.
2019-07-28 18:08:23 -07:00
bjorn f564444641 Fix some WebGL issues; 2019-07-28 17:28:18 -07:00
bjorn 239a9514ea Model: Fix animations that aren't keyed at t=0; 2019-07-19 16:42:51 -07:00
bjorn d0ee0d9b1a glTF: Fix transform for scenes with multiple root nodes; 2019-07-19 16:42:13 -07:00
bjorn 2b19c64aca rm primary DeviceButton and DeviceAxis;
It is confusing and doesn't really solve the intended problem very well.

For now we will all just suffer with our tedious device-specific Lua code.
2019-07-17 17:33:21 -07:00
bjorn 122143b13a vec4; 2019-07-16 20:30:51 -07:00
bjorn 9156fa2cbf Vector rework; 2019-07-16 20:30:51 -07:00
mcc 39f8203442 Don't reset camera position of desktop driver on reset 2019-07-16 20:27:45 -07:00
bjorn 84cdc592bc Make sure lovrBufferUnmap always unmaps; 2019-07-12 20:16:18 -07:00
bjorn 2eb4b779ab Model cleanup; 2019-07-11 20:13:47 -07:00
bjorn 4b4020d3a7 Model:pose; Model:getNodePose; 2019-07-11 20:09:46 -07:00
bjorn 8e2775ef6d Math: cleanup; 2019-07-11 11:35:50 -07:00
bjorn 6b87576e6d Channel: cleanup; 2019-07-11 11:29:18 -07:00
bjorn 8c76e6f19b RandomGenerator: cleanup; 2019-07-11 11:24:34 -07:00
bjorn 1f8a7e073f Curve: cleanup; 2019-07-11 11:22:03 -07:00
bjorn f81a65430b Add support for cubic spline keyframe interpolation; 2019-07-11 11:05:53 -07:00
bjorn 3c07ad6b0b Replace Animator with Model:animate; 2019-07-10 22:08:19 -07:00
bjorn 4372eb293e rm comma operator;
everyone is making fun of me haha
2019-07-10 18:46:51 -07:00
mcc f5633f4248 Fix lovr.filesystem.append()
Previously, this program function lovr.update(dt) lovr.filesystem.append("/test123", lovr.timer.getTime()) end would fail in lovr because lovrFileWrite required the file to be in write mode (not append)
2019-07-10 16:29:09 -07:00
mcc a6936b5649 Fix -DLOVR_ENABLE_THREAD=OFF compile
l_event.c was processing a thread-related event and in the process using a thread struct, even when LOVR_ENABLE_THREAD is undefined and threads do not exist. I caused the thread event type to simply not exist when the thread module is not being built.

Since the event is now only sometimes present, I put it at the end of the enum as slight protection against binary mismatches with dynamically loaded modules.
2019-07-10 16:23:20 -07:00
mcc 070892ee12 Fix crash with lovr.event.quit("restart") on Oculus Mobile
Because of how and when draws occur in our Oculus Mobile path, during a restart it would attempt to draw a frame after lovrGraphicsDestroy() is called, leading to a crash in lovrGraphicsSetCamera(). This blocks draws until the restart is finished and renderTo() has been called (conveniently detectable using the existing state.renderCallback).
2019-07-10 16:10:02 -07:00
bjorn f208a5e067 Fix array initialization;
Because the new arr.h contains an array on the stack, we can't
initialize it and then copy it, or the pointer to the stack array
will be pointing to the wrong thing, causing incorrect behavior.
2019-07-09 09:06:11 -07:00
bjorn af29e29e4d Fix lovr.graphics.setProjection;
Needed to be using new frameData stuff.
2019-07-08 14:35:54 -07:00
bjorn f2feda9420 oculus: Remove offset;
Since we are calling SetTrackingOriginType with floor level, we don't
need to apply the seated-level t.headset.offset adjustment.
2019-07-05 01:05:02 -07:00
mcc 1b085a00ea As discussed in slack, Oculus should be letting lovrCanvasCreate decide whether to double 2019-07-02 13:28:36 -07:00
bjorn 57f97056da Use I4ui instead of I1ui for lovrDrawID constant value;
glVertexAttribI1ui isn't supported on GLES for some reason.
2019-07-02 12:51:36 -07:00
bjorn 2d6aa18069 Be a little more correct about when draw id is written; 2019-07-02 00:14:01 -07:00
bjorn 775cf5cda1 Don't accidentally draw meshes too many times;
Oops!
2019-07-02 00:09:43 -07:00
bjorn 44da36b610 Write draw ids at the right time (fix flicker); 2019-07-01 02:47:59 -07:00
bjorn 2fb393306c rm skybox args;
They used to always be necessary, now they are almost never necessary.
2019-06-29 21:01:03 -07:00
bjorn e3e930d6cc Set index buffer at the right time;
Just a small ordering issue with previous commit.
2019-06-29 20:39:01 -07:00
bjorn 6256acfc6d Ahhh fix everything;
- If you have an instanced batch, it will use the instanced mesh.  That
  has a drawID attribute that uses the identity buffer, which has a vertex
  divisor.  BUT if you only have one instance, then we won't emit an
  instanced draw, and the use of a divisor'd attribute w/ a non-instanced
  draw is causing mega problems on macOS.
- This also fixes observed macOS bugs like:
  - Needing to have a small UBO
  - Flickering at startup
  - Flicker when writing to the last byte of a UBO
  - etc.
- Also make the generic attribute value for lovrDrawID more correct (scalar instead of vector).
2019-06-29 20:24:36 -07:00
bjorn afe4d8c0e3 Fix GL error with buffer unmapping;
This doesn't seem to fix any of the macOS rendering bugs though...
2019-06-29 20:08:31 -07:00
bjorn e82ba030a6 lovr.headset.getDisplayTime;
Returns the predicted display time, which is the estimated time at which
the photons of the next frame will hit the eyeballs of a person in the HMD.

This should be used instead of lovr.timer.getTime when used for rendering
something that is time-dependent.  Updating simulations, logic, or access
to high frequency times should still use lovr.timer.getTime.
2019-06-29 17:36:36 -07:00
bjorn d87fc56b63 lovr.headset.getDisplayMask; 2019-06-28 00:13:45 -07:00
bjorn 4222be88b5 Use UBO for Camera matrices;
Ugh I don't like the "Camera" concept anymore, but I can't figure
out how to easily get rid of it.  Maybe wait till displays are a thing.
2019-06-27 22:17:50 -07:00
bjorn fa6c4a6b39 Organization; 2019-06-27 21:04:15 -07:00
bjorn 370124c88d Batching cleanup;
- Rename drawMode to topology in some places.
- Batch uses DrawCommand internally to simplify stuff.
- Do less work while flushing.
- Store global head/tail cursors instead of unused per-batch cursors.
2019-06-27 20:58:42 -07:00
bjorn 779949964f More small batching changes;
- Reduce number of batches to 4.  Yeah it's arbitrary, will monitor.
- Just use memcmp for BatchParams.  Since we're using designated initializers,
  we aren't running into issues with memcmp+struct padding bits, and in the
  event it does lead to false positives on some platforms, at worst we'll just
  experience a harmless reduction in batching efficiency.
2019-06-27 19:05:54 -07:00
bjorn 6da17b0a91 Optimize gamma correction;
Currently, we gamma correct colors on every clear and every draw.
It's taking a lot of time.  Instead, we'll gamma correct colors
when they're changed using lovr.graphics.setColor/setBackgroundColor.
2019-06-27 15:41:57 -07:00
bjorn 7e067da8e7 Add defaultCanvas;
Having a normal Canvas object that represents the backbuffer reduces
some indirection where we have to last-minute check if a Canvas is
set.  It also means that all of the draw-related info that was _sometimes_
on the Canvas is now _always_ on the Canvas, which reduces the amount
of redundant information we need to provide for a draw call.

There may be some issues related to changing the width/height/stereo
of the default Canvas.
2019-06-27 15:36:51 -07:00
bjorn 26e474bcfc Simplify Mesh handling;
Removes some indirection from flush (I guess moves it into batch,
not sure what's better).
2019-06-27 14:14:31 -07:00
bjorn 551dea8c86 Adjust includes; 2019-06-27 13:44:09 -07:00
bjorn b8e63adcbf graphics: Cleanup;
Make batching structs and defines private.
2019-06-27 13:38:38 -07:00
bjorn fe21de403b lovrGraphicsDrawMesh; 2019-06-27 13:35:43 -07:00
bjorn b3080ae5d9 rm macos instancing hack;
I haven't been able to see adverse affects from it anymore.  Can
always put it back if it resurfaces.
2019-06-27 13:27:43 -07:00
bjorn 39b0d2d754 graphics: Minor refactoring; 2019-06-27 13:26:39 -07:00
bjorn 297208c205 Minor cleanup to stream buffer code; 2019-06-27 13:01:04 -07:00
bjorn 052990aa47 Make some graphics structs private; 2019-06-27 01:48:35 -07:00
bjorn 2baa8d03ee Make singlepass detection more readable; 2019-06-26 21:47:22 -07:00
bjorn adf5e69ea1 oculus: Remove unused variable; 2019-06-26 14:51:32 -07:00
mcc fc90a03584 Fix MSVC-specific warnings 2019-06-25 19:16:48 -07:00
mcc 430fbc27d5 ovrHand -> ovrHandType in oculus.c. We don't understand how this worked before but it fixes the oculus-windows build. 2019-06-25 19:16:48 -07:00
bjorn 6b2de4a0a1 Temporary implementation for persistent buffer discard;
Should fix potential crashes with persistent buffers.
2019-06-25 19:16:08 -07:00
bjorn 010bbff519 openvr: Fix stereo Canvas dimensions mismatch;
(The width is automatically doubled when stereo now)
2019-06-25 19:15:38 -07:00
bjorn 312a7617c3 Fix typo in shader; 2019-06-25 19:15:11 -07:00
bjorn 09b6f74acf Native textures: initialize mipmapCount; 2019-06-25 18:59:31 -07:00
bjorn 749774e2fc Native texture depth must be explicitly specified;
To fix validation errors when attaching them to Canvases.
2019-06-25 18:57:18 -07:00
bjorn 7e65116add Fix oculus backend; 2019-06-25 18:16:54 -07:00
bjorn a3d5371d01 rm lib/vec/vec from oculus.c; 2019-06-25 18:07:56 -07:00
bjorn 928ccee5f1 Multiview; 2019-06-25 01:21:59 -07:00
bjorn a691192af9 lovrBufferDiscard; 2019-06-25 01:21:59 -07:00
bjorn 5cd93b66c6 rm fence syncs;
They are too buggy and are not as efficient as orphaning.
2019-06-24 19:17:55 -07:00
bjorn 8d2f005bf3 Add stdlib.h to oculus_mobile; 2019-06-21 11:28:40 -07:00
bjorn 9f3638b018 TextureData:paste; 2019-06-20 23:36:18 -07:00
bjorn 7ebee200ea rm strdup;
It isn't part of C, causing compiler errors on some platforms.
2019-06-20 22:21:31 -07:00
bjorn 879c789a08 Polyfill M_PI;
It technically isn't part of C, which is causing problems on some systems.
2019-06-20 21:43:40 -07:00
bjorn b54f68a3d5 glTF: Support Textures with missing images and samplers; 2019-06-20 17:44:30 -07:00
bjorn 5881bdd5b1 Fix gpu timer array; 2019-06-20 14:44:28 -07:00
bjorn 4611b1c9a3 Add no-op standard shader; 2019-06-20 14:21:35 -07:00
bjorn 612f699aa4 Rename default shader to unlit; 2019-06-20 14:09:55 -07:00
bjorn d856f6d592 opengl: Create default texture at startup;
More predictable performance, fixes an obscure bug.
2019-06-20 11:35:46 -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 909ee1ad79 Use highp in vertex shaders on GLES; 2019-06-10 08:12:36 -07:00
bjorn de6d3dab5b Add tup build system;
It's still a rough draft and likely only works on my machine, but can be
improved over time.

Rough explanation:

- tup.config contains high-level build configuration defaults.
- Tuprules.tup contains mostly compiler flags (generated from the
  tup.config) and declares some macros used to compile code.
- Tupfile takes all generated object files and links them into the
  lovr executable.
- src/Tupdefault defines the default build steps for src and all
  subdirectories, which is to compile all .c files to .o files and put
  them in the <objects> bucket for linking by the toplevel Tupfile.

It's possible to have multiple configs active at once for different
platforms, projects, etc.  To do this, create a folder for each build
variant you want, and place a tup.config in each folder (it can be a
symlink, which is helpful).  Then, invoking `tup` will build all your
variants, or you can build a specific one by doing `tup <foldername>`.
2019-06-10 04:06:22 -07:00
bjorn 31a1dc6cee Details; 2019-06-10 03:39:53 -07:00
bjorn 98f4365474 Add astc and dxt GraphicsFeatures; 2019-06-09 23:59:57 -07:00
bjorn b0a7d5c122 ASTC textures;
I like typing numbers.
2019-06-09 09:11:29 -07:00
bjorn 0b5c609264 Add OpenVR touch bindings;
Untested.
2019-06-06 01:10:50 -07:00
bjorn 5551f76557 Reset render data when restarting in oculus_mobile;
Fixes a crash where rendering would occur with the old Lua state
after a restart.
2019-06-05 20:23:21 -07:00
bjorn c0f4e2848b Update android build; 2019-06-05 20:22:51 -07:00
bjorn 0c75f40793 rm the other restrict;
I guess it just isn't portable.
2019-06-04 04:43:02 -07:00
bjorn feae7bdf3a rm extra restrict qualifier;
Maybe this is confusing MSVC.  Doesn't appear to impact codegen.
2019-06-04 04:20:23 -07:00
bjorn d1f754d5f9 Fix Model memory leaks; 2019-06-03 08:13:42 -07:00
bjorn 06c6b172de vec3 has 4 elements; 2019-06-03 07:20:03 -07:00
bjorn 31e086edaf Inline all the maf functions; 2019-06-03 07:19:25 -07:00
bjorn 4eb03006d7 Fix SoundData loading; 2019-06-03 00:29:41 -07:00
Bjorn Swenson 68c1b6a201
Merge pull request #122 from bjornbytes/hand-updates
Hand updates
2019-06-03 00:14:45 -07:00
bjorn dc34ed4570 Start to trend towards 4-element arrays for vec3;
It will be important for enabling more SIMD.
2019-06-02 20:35:52 -07:00
bjorn cf7a738a9f Fix openvr.c; 2019-06-02 02:27:19 -07:00
bjorn 83c2d3ceef Optimize timer module slightly; 2019-06-02 02:02:15 -07:00
bjorn 22fe333150 Update refcounting (again);
- Ref struct only stores refcount now and is more general.
- Proxy stores a hash of its type name instead of an enum.
- Variants store additional information instead of using a vtable.
- Remove the concept of superclasses from the API.
- Clean up some miscellaneous includes.
2019-06-02 01:02:26 -07:00
bjorn d2bff7d239 lovr.graphics.tick and tock;
Initial support for GPU timer queries.
2019-06-01 17:29:53 -07:00
bjorn 84bd50379d Add primary button/axis;
It's called "primary".
2019-05-31 12:00:15 -07:00
bjorn 7ac3d6938b rm TRACKER devices for now;
This is not the correct way to expose them.  It doesn't seem like
there is consensus on how to expose them yet.  At the very least
LÖVR should instead use the hardcoded OpenVR tracker paths like
/camera, /keyboard, /foot/left, /foot/right, etc.

See these issues:

- https://github.com/ValveSoftware/openvr/issues/1030
- https://github.com/ValveSoftware/openvr/issues/962
2019-05-31 10:57:29 -07:00
bjorn af0678f9e9 rm DEVICE_HAND;
If we expose both unhanded hands and handed hands, people need to
deal with handling (haha) both cases in their apps.  It's simpler
to always deal with left and right hands, even though it is a bit
less general.  Still, this is congruent with the current state of
OpenVR and OpenXR, and I think there are still open questions about
the more uncommon cases where there are more than two hands.
2019-05-31 10:41:40 -07:00
bjorn fe559903e1 Oculus Go controller has handedness; 2019-05-31 10:37:43 -07:00
Bjorn Swenson 5ec6f1d1d1
Merge pull request #120 from mcclure/oculus-quest
Oculus quest support
2019-05-28 16:30:17 -07:00
mcc 1449d4c914 Oculus mobile: Support getAcceleration 2019-05-28 18:59:05 -04:00
bjorn 29b2420dea Work around macOS flicker bug;
At this point I don't know if maybe I'm just using UBOs wrong but whatever.
2019-05-27 19:05:47 -07:00
bjorn 4221c547d7 glTF: Add support for base64 buffer data; 2019-05-26 21:13:59 -07:00
bjorn 56f4c812ce Small intermediate fix for models without animators; 2019-05-26 21:12:07 -07:00
bjorn d08c454f46 Fix sign issue in rasterizer;
Fixes missing glyphs.
2019-05-26 12:51:25 -07:00
mcc f4189d13e8 Oculus Mobile fixes: Fix potential crash, fix touches on Go after Quest changes 2019-05-26 11:17:49 -04:00
mcc 991b35a628 Oculus mobile: revamp bridge to support Oculus Quest 2019-05-26 10:29:42 -04:00
bjorn 0b8bc4145e openxr: Begin the session at the correct time; 2019-05-25 20:15:42 -07:00
bjorn d5ad10f408 Permit symbolic links in lovr.filesystem;
If needed, it can be made configurable later.
2019-05-24 19:16:43 -07:00
bjorn 3bf08f0ca3 Add the ability to create default shaders;
lovr.graphics.newShader('font')
2019-05-22 18:00:02 -07:00
bjorn db5076a100 Rename SHADER_DEFAULT to SHADER_UNLIT; 2019-05-22 16:34:57 -07:00
bjorn 698466d19c Add missing include in animator.h; 2019-05-21 00:32:20 -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 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 67b76e08c2 Details; 2019-05-20 04:15:24 -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