Commit Graph

2997 Commits

Author SHA1 Message Date
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
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