Commit Graph

2580 Commits

Author SHA1 Message Date
bjorn 90e985c45b Fix MSAA Canvas readback; 2020-05-26 09:53:26 -06:00
bjorn 6d2fdac89f Prefix headset implementation files with headset_; 2020-05-24 13:32:13 -06:00
bjorn d6abcdfb0e Fix 2 memory leaks; 2020-05-23 13:03:16 -06:00
bjorn 86ad4f654c Fix bug with Mesh:setVertices; 2020-05-21 00:31:50 -06:00
bjorn 1185fcf6e1 Autodetect integer attribute types;
Fixes inability to use integer attributes with Mesh.
2020-05-21 00:31:49 -06:00
mcc 89cdeb1e4f shaderBlock:send(blob) did not work due to typo 2020-05-20 16:34:19 -04:00
bjorn 75e26f0051 Move core/hash to core/util; 2020-05-19 13:49:40 -06:00
bjorn 92ac93e6b8 Improve image uniform errors; 2020-05-18 15:14:17 -06:00
bjorn f7dddfe3fd Fix PNG IDAT CRC; 2020-05-18 12:41:49 -06:00
bjorn 680dc00b5b rm menu button from oculus touch bindings;
Saw an error about this in logs, let's see if it fixes touch controllers.
2020-05-11 18:04:37 -06:00
bjorn ebc69c6c93 win32: AllocConsole if AttachConsole fails;
This may help retrieve stdout when running lovr outside of cmd.
2020-05-11 15:23:35 -06:00
bjorn dab0be7055 World:getColliders; 2020-05-11 12:05:30 -06:00
bjorn 95635b4b02 Support loading 16 bit images;
With 1, 2, or 4 channels;
2020-05-10 02:35:45 -06:00
bjorn 6539bc1bd2 Make physics orientation getters more consistent; 2020-05-10 02:08:36 -06:00
Bjorn 62fbf7e0e3
Merge pull request #257 from jmiskovic/physics-vectors
Physics API support for vectors
2020-05-10 01:04:23 -07:00
bjorn 1e78ac8669 Add r16, rg16, rgba16 texture formats; 2020-05-10 01:59:58 -06:00
Josip Miskovic e2d1b33eed Shapes API accepts both vec3 and number coords 2020-05-10 01:12:45 +03:00
Josip Miskovic 2d6f7802f1 Joints API accepts both vec3 and number coords 2020-05-10 01:12:45 +03:00
Josip Miskovic f2fcc4e5c4 Collider API accepts both vec3 and number coords 2020-05-10 01:12:45 +03:00
Josip Miskovic add346519a Physics API accepts both vec3 and number coords
When creating shapes and joints, arguments accept either coordinate
numbers as before, or vec3 objects. For functions that receive more than
one set of coordinates, any combination of coordinates and vectors is
accepted.
2020-05-10 01:12:45 +03:00
bjorn 0be36da334 Add beacon devices;
There are 4 new devices: beacon/1 through beacon/4.  They represent
tracking reference like StemaVR base stations or Oculus cameras.
There are 4 because that's how many base stations you can have in
a single tracking setup.

Right now only OpenVR exposes poses for them.
2020-05-07 17:11:25 -06:00
Bjorn 195966b964
Merge pull request #251 from jmiskovic/world-vectors
Physics world accepts both vec3 and number coords
2020-05-07 09:32:36 -07:00
Josip Miskovic 2463737722 Physics world accepts both vec3 and number coords
When creating colliders, setting gravity or casting rays on world,
arguments accept either coordinate numbers as before, or vec3 objects.
For functions that receive more than one set of coordinates, any
combination of coordinates and vectors is accepted.
2020-05-07 19:01:30 +03:00
bjorn 9ba814fe3f omg; 2020-05-04 17:30:41 -06:00
bjorn ed4b8d1f3d rm unneeded internal Source functions;
Now that things are in the same file, setters for internal source
fields are unnecessary, making things a bit simpler.
2020-05-03 13:02:19 -06:00
bjorn c455b0750e rm unused Source functions from header; 2020-05-03 13:00:02 -06:00
bjorn d847dd663a rm unused audio headers; 2020-05-03 12:57:50 -06:00
bjorn b9a2bddd25 Put all the audio stuff in one file;
If there was ever some sort of hypothetical switch to a different
audio library, this would make such a switch easier.
2020-05-03 12:54:35 -06:00
bjorn b0289de9a6 Error instead of crashing when skin has too many joints;
ModelData is still allowed to load skins with more joints, since
the limitation is in the graphics side of things (Model).

Eventually we will use a buffer for joints to alleviate this.
2020-05-02 14:14:29 -06:00
bjorn c0d73ab541 Add resize event; lovr.resize callback; 2020-05-02 13:09:10 -06:00
bjorn b035f8e4dc core/fs: Use DWORD instead of uint32_t in fs_read and fs_write;
Fixes a warning.
2020-04-30 16:53:10 -06:00
bjorn ce2a28360d Unconditionally cast ref to volatile long on win32;
This was originally a C++-only contribution, but clang also warns
about it on windows when compiling as C.

It's nice to have one less thing specific to C++.
2020-04-30 16:49:53 -06:00
bjorn eea73792a6 Minor formatting; 2020-04-30 14:15:36 -06:00
Josip Miskovic 097d39628a Initialize inertia information for new colliders
Inertia matrix has to be calculated with algorithm specific for each
shape. Without calculated matrix the physics behaves very floaty and
slowed down.
2020-04-29 23:05:11 +03:00
Josip Miskovic a4b0d004a1 Fix collider setOrientation() and setPose()
The conversion from angle,ax,ay,az to quaternion is already done in
physics module.
2020-04-28 20:15:09 +03:00
bjorn 7d316d6218 Add internal filesystem module comment; 2020-04-22 01:47:16 -06:00
pendingchaos 28a2e5fd4c Fix when depth test is disabled but depth write is enabled
GL_DEPTH_TEST controls both whether depth testing and depth writes are
enabled. So if depth testing is disabled and depth writes are enabled,
GL_DEPTH_TEST has to be enabled and the compare mode should be GL_ALWAYS.
2020-04-21 23:39:16 +01:00
mcc b5e72d8bd9 Restart cookie minor changes for PR review 2020-04-16 10:57:13 -04:00
mcc c32fbdd8fc oculus mobile driver now supports restart cookie 2020-04-16 00:33:35 -04:00
mcc fbcce7fc59 Reworked quit/restart events (compatibility break)
Based on Slack conversation, the following changes:
- lovr.event.quit("restart") no longer supported
- lovr.event.quit no longer takes restart "cookie"
- When lovr.event.restart() called, lovr.quit() is not called, instead lovr.restart() is called
- Value returned from lovr.restart(), when called, becomes the cookie
- lovr.event.quit takes the lovr.event.quit() return code as an argument

lovr.run() is unchanged, it still returns (exit code | "restart", cookie).
2020-04-16 00:32:54 -04:00
mcc 334077c9f8 Fix crash on lovr.event.quit("restart") 2020-04-15 17:59:25 -04:00
mcc 9f5fd60545 The Quest has thumbsticks, not touchpads. Fix constants. 2020-04-15 16:44:39 -04:00
Colby Klein 34cef2673c
use clamp/max macros 2020-04-12 16:17:01 -07:00
Colby Klein 809d9b7385
ignore haptics for non-hands
seems a little strange that vibrating head or something would affect the right controller.
2020-04-12 16:12:06 -07:00
Colby Klein 14e79bf8ef
implement haptics on oculus 2020-04-12 16:02:59 -07:00
Bjorn 89e2e6df8e
Merge pull request #236 from mcclure/no-mat4-project
Kill mat4_transform_project
2020-04-05 18:07:56 -06:00
mcc d8abfcfae3 Remove mat4_transform_project, it not only duplicates mat4_transform, it is buggy 2020-04-05 19:51:37 -04:00
Colby Klein 077d90bc79
update ovr driver to newer frame submission api
as mentioned on slack.

there are some situations you can get into (high load in some place or other) where the newer frame submission api will behave much more consistently, and I've noticed no negative effects.

besides, the other one is deprecated as best i can tell.
2020-04-02 22:35:12 -07:00
bjorn aed0499c5f Add oculus_touch to action manifest; 2020-04-02 22:47:36 -06:00
bjorn 37d8df4784 Allow initializing empty TextureData with Blob; 2020-03-29 13:47:57 -06:00