Commit Graph

2870 Commits

Author SHA1 Message Date
Bjorn f048f6d6f0
Merge pull request #218 from bjornbytes/android-bounds-size
oculus_mobile: Expose bounds dimensions;
2020-02-13 15:53:25 -08:00
Bjorn 56dad769dd
Merge pull request #217 from bjornbytes/android-button-changed
oculus_mobile: Expose button changed states;
2020-02-13 15:53:11 -08:00
Bjorn 4b041820aa
Merge pull request #216 from bjornbytes/android-display-frequency
oculus_mobile: lovr.headset.getDisplayFrequency;
2020-02-13 15:52:56 -08:00
bjorn e218733ee2 Make splay axis 1D; 2020-02-13 15:18:12 -08:00
bjorn a0c7d0235f leap: rm curl/splay emulation; 2020-02-13 15:13:08 -08:00
bjorn 5197d30b94 Add getSkeleton; 2020-02-13 15:08:59 -08:00
bjorn 0e4c42c8b0 Add pinch axis; 2020-02-13 15:08:58 -08:00
bjorn 81e3119321 leap: curl/splay emulation; openvr fixes; 2020-02-13 15:08:58 -08:00
bjorn 7e34c7adcc leap: getPose for finger devices; 2020-02-13 15:08:58 -08:00
bjorn 71e63ddac2 openvr: add curl/splay axes for finger devices; 2020-02-13 15:08:58 -08:00
bjorn d448bdc95c Finger devices/axes; OpenVR finger poses; 2020-02-13 15:08:58 -08:00
Bjorn 8e3af04361
Merge pull request #220 from alloverse/fix/desktop-wasPressed
desktop: fix wasPressed/wasReleased
2020-02-13 09:42:09 -08:00
Nevyn Bengtsson f2d5824a2b desktop: fix wasPressed/wasReleased 2020-02-13 18:28:02 +01:00
bjorn 443376efde ModelData: Use union for transform fields;
Nodes can have either a transform matrix, or decomposed transform
properties, but never both.  Using a union means we can store both
of those variants in the same piece of memory, using the existing
matrix boolean to figure out which one to use.

This reduces the size of the struct by 48 bytes (152 -> 104), which
ends up speeding up some model operations, I'm guessing due to the
CPU cache.
2020-02-11 16:38:31 -08:00
bjorn 155718d161 shaders: Change abstract parameters to named parameters; 2020-02-11 16:17:54 -08:00
bjorn 7edb562732 Add lovr.headset.getTime;
Unlike lovr.timer.getTime, this is the predicted time at which the
current frame will be displayed.  It can be used in place of
lovr.timer.getTime for smoother animations.  It's unclear if this
could be used for a suitable replacement for dt though.
2020-02-09 11:26:23 -08:00
bjorn e8fdd5d7f0 Support KTX textures containing ASTC data; 2020-02-08 03:57:59 -08:00
bjorn 2097241596 Improve ASTC loading;
Just a little more reliable and easier to read.
2020-02-08 03:57:59 -08:00
bjorn c1e231e756 oculus_mobile: Expose bounds dimensions; 2020-02-08 03:32:50 -08:00
bjorn adcbe6d707 oculus_mobile: Expose button changed states; 2020-02-07 23:01:01 -08:00
bjorn 8d22935c60 oculus_mobile: lovr.headset.getDisplayFrequency; 2020-02-07 22:21:32 -08:00
bjorn 02a73f333e oculus_mobile: respect t.headset.msaa; 2020-02-07 22:09:47 -08:00
bjorn c502f5b62a Add highp shader flag that sets default fragment precision to highp;
Also, precision qualifier is required to work on desktop GL, so
we don't need ifdefs for it!
2020-02-07 19:44:51 -08:00
bjorn cae8bba522 Remove lovrMain macro;
We want lovrMain to be the entrypoint but we can't figure out how
to do this in a way that wouldn't break things, on all platforms.
2020-02-07 19:25:55 -08:00
bjorn 723f5684cf Fix mat4_fov and desktop driver projection;
OpenVR may need updating now, but at least we know what the correct
approach is now.
2020-02-06 17:32:44 -08:00
bjorn 4a545e4d04 EGL context creation fixes; 2020-02-04 16:48:03 -08:00
bjorn dbf8596246 Update contributors list; 2020-02-03 15:04:58 -08:00
bjorn 67ba5f3a82 Add more graphics stats; 2020-01-31 03:43:52 -08:00
Bjorn 567c529b4a
Merge pull request #210 from porglezomp-misc/gles-compute
Use different compute #version with OpenGL ES
2020-01-31 03:39:43 -08:00
Cassie Jones 9845fee2b6 Use different compute #version with OpenGL ES
GLES doesn't like #version 430 for compute, it wants #version 310 es.
We can conditionally compile that.
2020-01-31 06:24:08 -05:00
bjorn be4db58fa3 "Fix" compute blocks on GLES;
There can only be one compute block.
2020-01-30 19:14:25 -08:00
bjorn c9c5d43829 Shader:hasBlock; Shader:sendBlock errors on missing block; 2020-01-30 18:26:05 -08:00
bjorn a1a53b4bed sampler2DMultiview; textureMultiview; 2020-01-30 17:48:15 -08:00
bjorn 78f272247b newCanvas creates array textures when multiview; 2020-01-30 17:48:01 -08:00
bjorn d971749b85 oculus_mobile: Fix vrapi_getView* signatures; 2020-01-30 17:09:06 -08:00
bjorn f8d3172868 opengl: Prefer state.features.compute to ARB_compute_shader; 2020-01-29 18:22:16 -08:00
bjorn f89998b21f Add eye/left and eye/right devices;
Currently nobody returns data for them, though headset drivers could
start to provide poses estimated from the head pose and IPD info.

This also makes it easier to integrate eye tracking later.
2020-01-29 17:53:03 -08:00
Bjorn 12d2e32903
Merge pull request #206 from bjornbytes/headset-views
Headset views;
2020-01-29 17:24:34 -08:00
bjorn 9ea76fac7b rm placeholder getFov code; 2020-01-29 17:09:23 -08:00
bjorn c73fadf5a3 Mark compute shaders as available on ES3.2; 2020-01-29 14:08:09 -08:00
bjorn 3c2154c824 Add unused EGL context creation; 2020-01-28 21:42:44 -08:00
bjorn c9a06a37cb Refactor main; Add unused android entrypoint; 2020-01-28 21:38:44 -08:00
bjorn 0aa724116e Headset views;
- lovr.headset.getViewCount
- lovr.headset.getViewPose
- lovr.headset.getViewAngles
2020-01-27 22:11:58 -08:00
bjorn b19a391c32 desktop: emit focus events; 2020-01-27 21:10:27 -08:00
bjorn 56dc8d0b9e Handle stereo shaders better;
- Creating a shader from a DefaultShader will respect the stereo flags.
- Auto shaders will properly be stereo/nonstereo based on the target Canvas.
2020-01-27 16:33:15 -08:00
bjorn 4379d25e1c Organization; 2020-01-27 14:02:54 -08:00
Bjorn e7182730bb
Merge pull request #202 from porglezomp-misc/shaders-via-length
Compile shaders using source lengths
2020-01-27 13:18:21 -08:00
Cassie Jones 3e09120173 Compile shaders using source lengths
The previous implementation relied on glShaderSource inferring source
lengths when the lengths weren't specified. This relies on the sources
being properly null-terminated, however, which isn't the case due to
file loading changes which now use pointer + length. This could cause
intermittent crashes.

Changing this on the shader side meant adding some extra arguments for
passing around shader source lengths. For most of the other cases, where
we're using string literals as the sources, we can just specify -1 as
the length, since OpenGL will calculate the string length for you any
time the length is negative.
2020-01-27 16:13:21 -05:00
bjorn 7ca23bc58a lovr.headset.getDisplayFrequency; 2020-01-24 23:06:30 -08:00
bjorn 4f7bb9e53e lovr.headset.wasPressed; lovr.headset.wasReleased; 2020-01-24 22:48:36 -08:00