Commit Graph

2787 Commits

Author SHA1 Message Date
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
bjorn 51afbd9fd4 CMake: Also include msdfgen so when building as .app; 2020-01-24 22:10:15 -08:00
bjorn a0634005f3 CMake: Turn MACOSX_RPATH ON for msdfgen;
I think it's off because it's targeting an older version of CMake
or something.  There was a warning about CMP0042 as well.
2020-01-24 22:02:13 -08:00
bjorn c7f5406ce2 Make clipping planes consistent across most headset drivers;
The default far clipping plane was changed from 30 to 100 for openvr
and oculus.  oculus_mobile clipping planes can't be changed easily.
2020-01-23 11:25:38 -08:00
bjorn 8c429e89ac Fix -Wshadow; 2020-01-23 11:18:04 -08:00
bjorn 08577ee91b Fix cast-qual warning; 2020-01-23 11:01:27 -08:00
bjorn 4c1917f6ce Fix some prototypes; 2020-01-23 10:55:46 -08:00
bjorn 158fcca994 CMake: explicitly link with objc runtime on macOS; 2020-01-22 16:30:21 -08:00
bjorn 0f338c3ebd Fix getDirectoryItems on windows; 2020-01-22 16:09:35 -08:00
bjorn ddcdce25dc Minor style stuff; 2020-01-22 15:41:48 -08:00
bjorn 96d3288dae Update header; 2020-01-22 15:38:57 -08:00
bjorn a5424a1932 Microphone:getData supports sampleCount/destination; 2020-01-22 15:36:41 -08:00
Bjorn 3c65d238bc
Merge pull request #193 from alloverse/allo/mic
Sound adjustments: SoundData has-a blob, and mic sample size getter
2020-01-22 14:10:26 -08:00
bjorn f207c4d9a4 zip: Only call munmap if zip file was actually mapped; 2020-01-20 15:59:53 -08:00
Bjorn a7241d7dfa
Merge pull request #195 from mcclure/fs-normalize
Filesystem fixes
2020-01-20 15:51:45 -08:00
mcc ea06f8d7dc Filesystem fixes: Use normalize() in lovrFilesystemMount and dir_resolve; ensure enough room for zero terminator in zip_lookup 2020-01-20 17:12:37 -05:00
Nevyn Bengtsson e10799b8c8 microphone: less throwy, more MAX()y 2020-01-20 08:52:58 +01:00
Nevyn Bengtsson a5c59e2d12 Fixes from review 2020-01-20 08:49:11 +01:00
Nevyn Bengtsson 0bdb7c7c80 More has-a-ification of texturedata
I forgot to stage this yesterday??
2020-01-20 08:48:59 +01:00
Nevyn Bengtsson 95edb43654 TextureData: holds Blob instead of being Blob, just like SoundData
also replaces TextureData:getPointer with TextureData;getBlob
2020-01-19 22:59:44 +01:00
Nevyn Bengtsson 91cc385340 Remove redundant SoundData:getPointer() 2020-01-19 22:43:13 +01:00
Nevyn Bengtsson 9127dd823c Fix bugs in sounddata-has-blob 2020-01-19 21:22:23 +01:00
Nevyn Bengtsson 7107ecd235 SoundData:getBlob() 2020-01-19 17:50:04 +01:00
Nevyn Bengtsson 790629bc3e SoundData: has-a blob instead of is-a blob 2020-01-19 17:50:04 +01:00
Nevyn Bengtsson 8515cd98fe Add destination buffer size to microphone:getData()
So that we can use OpenAL's internal ring buffer and only dequeue
exactly the amount we need at the moment.
2020-01-19 17:03:35 +01:00
Bjorn c5edc6dedb
Merge pull request #190 from bjornbytes/android-canvas
Android Canvas
2020-01-17 12:19:49 -08:00
bjorn b1eeda96cb Small safety fix; 2020-01-16 09:32:12 -08:00
bjorn 0ecd8f6b49 Fix lovr.filesystem.getExecutablePath on macOS; 2020-01-16 09:21:21 -08:00
Bjorn 3a5c3ca97c
Merge pull request #189 from bjornbytes/channel-mutex
Channel ownership stuff
2020-01-15 17:54:00 -08:00
bjorn 2a52796c6f Commenting; 2020-01-15 17:56:09 -08:00
bjorn c0d1e28deb Fix ifdef for glTexStorage;
It's always present on GLES.
2020-01-14 19:39:10 -08:00
bjorn da88766e5a oculus_mobile: Discard depth/stencil buffers after rendering;
This was present in lovr-oculus-mobile.
2020-01-14 18:46:00 -08:00
bjorn 541400e0fe oculus_mobile: Create framebuffers from bridged swapchain textures;
This is a change that shifts the responsibility regarding the creation
of OpenGL framebuffers from vrapi-provided swapchain texture handles.
Previously, the LovrApp component of lovr-oculus-mobile was creating
framebuffers and passing native framebuffer IDs to lovr.  With this
change, lovr-oculus-mobile passes vrapi's swapchain textures to lovr
unmodified.  This allows lovr to create canvases using its conventional
method and also means that the properties of the canvases are no longer
hardcoded, so things like resolution and multisampling can be
customized.

There were also some issues with multiview canvases in LÖVR due to some
misconceptions about how multisampled multiview rendering works.  These
issues have also been fixed in this commit.
2020-01-14 18:26:01 -08:00