bjorn
cb8e1b5b91
Fix compile errors;
2021-02-08 16:08:29 -07:00
Nevyn Bengtsson
5e66ecf000
lovrPlatformRequest{AudioCapture->Permission}(Perm) + platform stubs
2021-02-08 16:08:29 -07:00
Nevyn Bengtsson
0265babef4
Android: Ask for permissions on demand
...
By looking for failed start and requesting then;
and then emitting a new event type when
permission has been granted or rejected;
and then using that event in the default
boot.lua to re-start capture.
2021-02-08 16:08:29 -07:00
Nevyn Bengtsson
6f803ad3f0
filesystem.append didn't append in Unix
2021-02-08 16:08:29 -07:00
bjorn
1dd692a009
lovrPlatformGetWindow -> lovrPlatformGetWin32Window;
2021-02-07 16:57:08 -07:00
bjorn
323436898a
Add WIN32_LEAN_AND_MEAN;
2021-02-07 16:49:34 -07:00
bjorn
d2ff6c29ac
Change inclusive module defines to exclusive;
...
This reduces the number of flags needed to get a regular build.
2021-02-07 16:45:03 -07:00
bjorn
cf2ab46bef
Fix arr_splice;
2021-02-04 01:41:35 -07:00
Josip Miskovic
944a6029f0
Add mat4:targetAt and modify the mat4:lookAt
...
lookAt() returns view matrix that can be used to transform the camera
perspective. target() returns model matrix that is used to change
model transform. Results are matrix inversions of one another. Now both
functions exist it is possible to use right one and avoid extra matrix
inversion.
2021-01-22 16:01:27 +01:00
bjorn
31defbe145
maf windows PI fix;
2020-12-28 12:37:19 -07:00
bjorn
3bc2c00b79
api doesn't include util;
2020-12-25 12:50:26 -07:00
bjorn
9bdceb0094
rm LOVR_INLINE;
...
Just use the inline keyword which is C99. Getting util.h out of
maf.h is nice.
2020-12-25 12:29:22 -07:00
bjorn
1a8f972f39
rm MAF_EXPORT;
...
It was only used when exporting functions for JavaScript.
2020-12-25 12:22:42 -07:00
Bjorn
c1b3bc61b1
Merge pull request #340 from alloverse/fix/append
...
filesystem.append didn't append in Unix
2020-11-27 18:53:44 -07:00
Colby Klein
08025b9ac0
fix mat4_lookAt translation offset
...
need to dot with the axes to not have bizarre results.
2020-11-27 17:48:33 -08:00
Nevyn Bengtsson
c557a8585f
filesystem.append didn't append in Unix
2020-11-26 22:54:41 +01:00
bjornbytes
80a33c0544
mat4_multiply -> mat4_mul;
...
quat_mul vs. mat4_multiply is inconsistent. Going with mul over
multiply is consistent with vec3_sub and Lua's __mul metamethod.
2020-11-21 14:32:59 -07:00
Jakob Bornecrantz
ca04882093
OpenXR: Add support for X11 and EGL on Linux
2020-11-16 17:02:51 -07:00
bjornbytes
94e7bafe47
KeyCode -> KeyboardKey because X11 conflict;
2020-11-16 17:02:51 -07:00
Bjorn
8a3d365268
Merge pull request #299 from Wallbraker/linux-openxr
...
Linux OpenXR support
2020-11-16 13:51:41 -07:00
Josip Miskovic
ceaac78439
Fix NaN return from mat4 unpacking
...
The caluclated angle is forced to PI if cos(angle) falls outside the
[-1, +1] range due to floating point precision error.
2020-11-16 19:03:52 +01:00
Jakob Bornecrantz
1400cd201a
OpenXR: Add support for X11 and EGL on Linux
2020-11-15 22:51:20 +00:00
bjornbytes
0b73e7d7a6
KeyCode -> KeyboardKey because X11 conflict;
2020-11-15 22:51:20 +00:00
bjorn
5f0542cc43
Fix util declspec spacing;
2020-11-12 18:08:05 -07:00
bjorn
827dfda748
TextureData:encode returns Blob; rm core/png;
2020-11-12 18:08:05 -07:00
bjorn
1e7749a58a
Fix MSVC warnings;
...
It's that time of year.
2020-11-12 18:08:05 -07:00
bjornbytes
a81cd0d731
KeyCode -> KeyboardKey because X11 conflict;
2020-11-12 18:08:04 -07:00
bjorn
81065a6e6b
Ref overflow no longer prints filename;
...
It was an absolute path.
2020-11-12 18:08:04 -07:00
bjorn
f472f0161c
os_web: Unregister callbacks in lovrPlatformDestroy;
2020-11-12 18:08:04 -07:00
bjorn
85cc82d8cb
v0.14.0;
2020-10-05 16:40:27 -06:00
bjorn
9ce5e9e625
os_web: Use correct selector for resize target;
2020-09-26 13:56:52 -07:00
bjorn
48a347ad01
mat4_fromQuat; mat4_getFov; getViewPose/Angles fixes;
2020-09-24 04:59:53 -07:00
bjorn
4f730a89a7
android: fix t.graphics.debug;
2020-09-16 20:40:39 -07:00
bjorn
99cb04f55b
Clean up JNI references/arrays in lovrPlatformGetBundlePath;
2020-09-16 19:39:27 -07:00
bjorn
8f581df33c
Properly cleanup local KeyEvent JNI references;
2020-09-16 19:36:32 -07:00
Josip Miskovic
62c4235448
Fix definition of HOME key on Android
...
There are two HOME keys defined in keycodes.h, the previously used
doesn't work and is labeled with the following comment: "This key
is handled by the framework and is never delivered to applications."
2020-09-08 17:23:17 +02:00
bjorn
5d659d0ac2
os_android: Add missing lovrPlatformSetSwapInterval;
2020-08-29 16:59:26 -06:00
bjorn
161a14adc9
Reorganize keynums;
...
This is slightly easier on the eyes.
2020-08-29 15:27:16 -06:00
bjorn
8973730d8a
openvr_getSkeleton;
...
Untested
2020-08-22 13:33:06 -06:00
bjorn
e50835260a
Clean up WebXR;
...
- Pointer lock
- wasPressed/wasReleased
- Cleanup
2020-08-21 04:37:38 -06:00
bjorn
6cadcea65d
WebXR updates;
...
- Make the renderloop synchronous by hijacking the RAF to run on the
XRSession when active.
- Convert os_web to use emscripten's native HTML5 interface instead
of going through GLFW.
- Stop using preinitialized GL context -- lovrPlatformCreateWindow
now creates the context.
- GLES2/3 emulation is not necessary.
- Remove inline sessions. The VR simulator is used to render to the
Canvas instead. webxr_attach and webxr_detach are used to replace
replace the active headset driver with the webxr driver when an
immersive session starts.
- Add noop desktop_getSkeleton.
2020-08-20 13:28:07 -06:00
bjorn
4a8e8ae2a9
Rename SUPER key to OS internally;
2020-08-19 14:03:06 -06:00
bjorn
f364fe030b
Make Windows platform functions more private;
2020-08-18 21:21:35 -06:00
bjorn
17ce02d429
Fix OpenXR compile errors and add some android support;
2020-08-18 21:10:06 -06:00
bjorn
810086e1ba
Make WindowFlags const in createWindow;
2020-08-17 00:55:12 -06:00
bjorn
65470f1e0e
Update webxr driver; rm webvr;
2020-08-16 00:31:20 -06:00
bjorn
438f7ef0d6
Add more Android keycodes;
2020-08-10 20:52:30 -06:00
bjorn
544c7a72e6
Add missing headers to os_web;
2020-08-08 19:19:56 -06:00
bjorn
2a8c454de1
Add some more keys;
2020-08-08 16:04:20 -06:00
bjorn
40594317c3
Android textinput event;
2020-08-08 12:36:09 -06:00
bjorn
6823942e3d
utf8_encode function;
2020-08-08 12:13:37 -06:00
bjorn
c24317d982
Start textinput event;
2020-08-07 15:17:19 -06:00
bjorn
682633d98b
Add scancode and key repeat arguments to key events;
2020-08-07 14:15:45 -06:00
bjorn
1e30c0d93c
Android key events;
2020-08-06 19:42:12 -06:00
bjorn
83ff4783c2
ALIGN macro aligns up instead of down;
...
So you don't have to add (n - 1). Hopefully this turns out to be
the common case.
2020-08-04 12:23:45 -06:00
bjorn
4160743b77
Fix desktop game packaging issue;
...
Accidentally hardcoded it to "assets" when updating Android.
2020-07-29 16:30:14 -06:00
bjorn
f0a5a8838b
OpenGL debug messages and contexts;
...
The new t.graphics.debug flag controls the following:
- If enabled, a debug context is created
- If disabled, a no-error context is created
- If enabled, GL debug messages are forwarded to lovr.log
2020-07-28 16:12:30 -06:00
bjorn
e3aa4c7d5d
t.graphics.debug flag;
2020-07-28 16:12:15 -06:00
bjorn
472c59bc7b
Fix windows build;
2020-07-19 17:57:05 -06:00
Elias Fleckenstein
7860322af9
Reverted size_t in ine 104 back to ssize_T
2020-07-11 15:32:15 +02:00
Elias Fleckenstein
ea9fadc1ad
Fixed errors & warnings when compiling on linux
...
I added header files with #include to prevent the implicit declaration warnings and fixed a typo in function size_t lovrPlatformGetExecutablePath(char* buffer, size_t size).
2020-07-10 16:32:45 +02:00
bjorn
9abed055d8
lovr.log;
...
lovr.log is a new callback that is invoked whenever LÖVR wants to
send the project a message. For example, this could be a performance
warning from the graphics module, an error message from one of the
headset backends, or an API deprecation notice.
The callback's signature is (message, level, tag). The message is a
string containing the message to log, level is a string that is currently
one of "debug", "info", "warn", "error", and tag is an optional string
that is used to indicate the source of the message for grouping purposes.
The default implementation of the callback just prints the message,
but the callback can be overridden to do things like filter messages,
write them to a file, or even render them in VR. Projects can also
invoke the callback directly to log their own messages.
2020-07-06 16:20:55 -06:00
bjorn
8b8681ad2f
rm core/hash;
2020-07-06 16:01:31 -06:00
bjorn
29f8365eed
Clean up os_android and fix event polling issues;
2020-07-03 20:17:39 -06:00
bjorn
515cec673c
Fix quit request for glfw;
2020-07-02 20:15:06 -06:00
bjorn
96337bf8cc
rm core/gpu;
...
This is far from done and will probably be structured a bit differently.
2020-07-02 10:46:13 -06:00
bjorn
9777306b70
rm oculus mobile;
2020-07-02 10:46:10 -06:00
bjorn
d8f7325bc7
lovr-oculus-mobile fixes;
2020-06-29 17:40:57 -06:00
bjorn
afaae2febb
Remaining android filesystem work;
2020-06-25 18:18:44 -06:00
bjorn
b77276fd1f
Android: make printf and print work;
2020-06-25 16:42:19 -06:00
bjorn
2042010b5b
Move core/fs paths to core/os;
...
Usually these are more of a platform-specific concept, and they
don't really interact with files or do any io.
There is a little bit of duplication among the *nix platforms since
they're similar, but overall this organization feels a bit better.
2020-06-25 13:28:40 -06:00
bjorn
8b281d56e3
Android: Organize tup rules; Fix manifest;
2020-06-25 13:27:18 -06:00
bjorn
a1aa3c8ae8
Finish vrapi driver;
2020-06-09 18:02:03 -06:00
bjorn
b34c03bcc8
Tup build system for android;
2020-06-09 18:02:03 -06:00
bjorn
75e26f0051
Move core/hash to core/util;
2020-05-19 13:49:40 -06:00
bjorn
f7dddfe3fd
Fix PNG IDAT CRC;
2020-05-18 12:41:49 -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
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
mcc
d8abfcfae3
Remove mat4_transform_project, it not only duplicates mat4_transform, it is buggy
2020-04-05 19:51:37 -04:00
bjorn
ef7ebaef85
core/gpu: vulkan feature detection; rm stats;
2020-02-23 00:47:59 -08:00
bjorn
3d3fb71a98
core/gpu: start shader stuff; coherent buffer mapping;
2020-02-21 18:38:33 -08:00
bjorn
93d556b603
zip: read compressed size from central directory;
...
Some zip writers do not write the compressed size to the local file
headers.
2020-02-21 15:44:48 -08:00
bjorn
b9b8062c18
core/gpu: texture views;
2020-02-21 01:48:58 -08:00
bjorn
f428ceacaf
core/gpu: gl backend compiles;
2020-02-20 15:52:41 -08:00
bjorn
7d2bec7283
core/gpu: add vulkan backend;
2020-02-20 12:23:31 -08:00
bjorn
6452f51680
core/gpu: attribute formats;
2020-02-19 20:28:30 -08:00
bjorn
a658da78ad
core/gpu: Add all uncompressed texture formats;
2020-02-19 19:36:30 -08:00
bjorn
aadadb968b
core/gpu: will it blend;
2020-02-19 18:33:59 -08:00
bjorn
0620cade9e
core/gpu: gpu_set_vertex_buffers; fixes;
2020-02-19 18:02:37 -08:00
bjorn
cb4a7a5a43
core/gpu: indirect drawing commands;
2020-02-19 17:42:33 -08:00
bjorn
238496de29
Start core/gpu;
2020-02-19 17:21:40 -08:00
mcc
e7938fe514
Fix ref.h in recent MSVC when compiled as C++
...
A cast is required at this point in MSVC 2019 when ref.h is included from a C++ file. This change has no effect on Lovr compiled normally (which compiles only as C), what this change does is make it possible for forks to extend Lovr with C++ files.
2020-02-17 14:47:08 -05:00
bjorn
47f4319ba8
core/png; rm stb_image_write;
2020-02-16 04:11:55 -08:00
bjorn
8477638fad
Fix warning;
2020-02-15 23:27:25 -08:00
bjorn
409c2ad0c6
Fix projection matrices;
2020-02-13 16:33:17 -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
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