bjorn
cb0a40a4b6
lovr.headset.isDown; lovr.headset.isTouched;
2019-05-12 22:21:06 -07:00
bjorn
45757f2fa3
Fixes;
2019-05-12 22:21:06 -07:00
bjorn
b95280006a
lovr.headset.newModel;
2019-05-12 22:21:06 -07:00
bjorn
cb79973b98
lovr.headset.vibrate;
...
Signature changed to take strength, duration, and frequency. All
are optional.
2019-05-12 22:21:06 -07:00
bjorn
36e4529dca
lovr.headset.getAxis;
...
Takes a path and returns 1-3 float values representing the components
of the axis at the path. The "touchx" and "touchy" axes are now just
"touchpad".
2019-05-12 22:21:06 -07:00
bjorn
5ab8904809
Controller polyfill; rm Controller pose functions; OpenVR paths;
2019-05-12 22:21:06 -07:00
bjorn
f87b4e6a25
Read paths; Desktop driver uses paths;
2019-05-12 22:21:06 -07:00
bjorn
48cf7e1874
Start paths;
2019-05-12 22:21:06 -07:00
bjorn
8208238df7
Support multiple tracking drivers;
...
Now the lovr.headset module initializes one display driver (the
first one in the list) and multiple tracking drivers. Only drivers
that implement 'renderTo' will be considered for display driver.
Tracking drivers are stored in a linked list, and retrieving pose
information involves trying all of the tracking drivers until the
pose is found.
2019-05-12 22:21:06 -07:00
bjorn
c95c0afb4c
Set alpha sampling to false in lovr.graphics.reset;
2019-05-08 20:09:42 -07:00
bjorn
c9775c84ac
Remove t.gammacorrect flag;
...
Gamma correct rendering is core in all supported OpenGL versions,
and it's usually a good idea to enable it.
2019-05-03 17:53:33 -07:00
bjorn
594921d2ec
newThread: can load thread code from a file or Blob;
...
Also fix a lifetime issue: If the string containing thread code was
garbage collected before you started the thread, you would have been
running free'd memory as Lua code!
2019-05-02 15:09:54 -07:00
bjorn
0e0cfee6e8
Font:getWidth returns lineCount;
2019-04-27 11:13:37 -07:00
bjorn
7eff3d7d4c
rm platform include;
2019-04-23 15:26:45 -07:00
bjorn
8af82d3bc1
Handle mipMapCount = 0 in DDS textures;
2019-04-23 15:25:31 -07:00
bjorn
afc8000fc7
rm stddef from util;
2019-04-21 11:52:04 -07:00
bjorn
c021afedae
Fix more warnings;
2019-04-20 18:42:25 -07:00
bjorn
7af5b9816a
Stupid float stuff;
...
I'm sorry.
2019-04-20 17:02:48 -07:00
bjorn
2dea0eacfb
Use -fvisibility=hidden to hide symbols by default;
...
This saves some space, and it's better to be conscious about symbol exports.
2019-04-20 16:20:05 -07:00
bjorn
b95c97ff57
rm unused mat4_setTransform function;
2019-04-20 14:15:43 -07:00
bjorn
0341233876
Also support hexcodes in lovr.graphics.clear;
2019-04-20 13:38:09 -07:00
bjorn
c247682653
BRING BACK HEXCODES;
2019-04-20 13:36:36 -07:00
bjorn
f268810d2a
Minor cleanup; Fix some undefined behavior;
2019-04-20 13:11:11 -07:00
bjorn
ec7b2c0b68
Formatting;
2019-04-20 12:07:26 -07:00
bjorn
ec7afed2cb
Update one trailing reference to lib/math.h;
...
In a comment...
2019-04-20 11:41:29 -07:00
bjorn
196b4ed010
Rename math to maf;
...
It's funnier and more compatible with some compiler setups,
since it won't get confused with the system <math.h>.
2019-04-20 11:39:20 -07:00
bjorn
26435be7ac
Fix batching edge case;
2019-04-14 13:47:02 -07:00
bjorn
9d90e83657
Fix Mesh attribute normalization;
...
Normalize i8 and u8 attribute by default.
Forward attribute normalization from glTF accessors.
2019-04-13 16:08:58 -07:00
bjorn
ed92c4e6db
font:setFlipEnabled(false) in lovr.errhand;
...
To prevent text from being upside down if you flipped the default font.
2019-04-13 15:40:47 -07:00
bjorn
44be3608a7
lovr.headset.getDirection; Controller:getDirection;
2019-04-12 15:08:45 -07:00
bjorn
9131c26fab
Fix Android build;
2019-04-11 15:26:59 -07:00
bjorn
c89a7139ee
Add File to the types table;
2019-04-11 15:20:21 -07:00
bjorn
1e05799669
More conservative buffer locking;
2019-04-11 08:35:55 -07:00
bjorn
ee8fdb773d
Add missing Texture release in OpenGL state backdoor;
2019-04-08 05:19:39 -07:00
bjorn
59e4a5bb8e
Oops, re-enable graphics module in boot.lua;
...
Also change format of message.
2019-04-08 05:18:28 -07:00
bjorn
0f6bcad90b
Nogame screen works without the graphics module;
2019-04-08 03:25:45 -07:00
bjorn
0139486f46
Fix misc builds;
2019-04-05 06:07:46 -07:00
bjorn
6e75ebafac
Fix windows build;
2019-04-05 06:01:12 -07:00
bjorn
fa4f240b7b
Fix plane uv argument parsing;
2019-04-05 05:50:43 -07:00
bjorn
011db5f1e5
Revert "Free objects in their destructors;"
...
This reverts commit d31dca5520
.
We can't unconditionally free because sometimes objects are temporarily
allocated on the stack.
2019-04-05 05:45:05 -07:00
bjorn
a5891bad92
lovr.graphics.plane uv arguments;
2019-04-05 05:34:28 -07:00
bjorn
0b62960472
Use lovrVariantDestroy in lovrChannelClear;
2019-04-05 05:15:17 -07:00
bjorn
32f73bcbf5
Add missing struct tag;
2019-04-05 05:13:09 -07:00
bjorn
5e74222a48
rm types from util;
2019-04-05 05:12:21 -07:00
bjorn
c20c94b3e1
thread: forward declarations;
2019-04-05 05:11:49 -07:00
bjorn
bd21c24403
physics: forward declarations;
2019-04-05 05:10:21 -07:00
bjorn
2d98d2fb30
math: forward declarations;
2019-04-05 05:09:34 -07:00
bjorn
941fc1717f
headset: forward declarations;
2019-04-05 05:08:03 -07:00
bjorn
ee27af1a85
graphics: forward declarations;
2019-04-05 04:59:14 -07:00
bjorn
323f9b3fb0
filesystem: forward declarations;
2019-04-05 04:34:21 -07:00
bjorn
66b7288764
event: forward declarations;
2019-04-05 04:32:58 -07:00
bjorn
9e7b9642de
data: forward declarations;
2019-04-05 04:27:48 -07:00
bjorn
0d30448bd0
audio: forward declarations;
2019-04-05 04:16:34 -07:00
bjorn
8df55795b1
rm stdint from util;
2019-04-05 04:08:06 -07:00
bjorn
410a2810cf
Move types into their own file;
2019-04-05 04:05:03 -07:00
bjorn
14cab6cd3c
Move utf helper into lib;
2019-04-05 04:04:52 -07:00
bjorn
86a342877f
rm nextPo2;
2019-04-05 03:56:56 -07:00
bjorn
d31dca5520
Free objects in their destructors;
2019-04-05 03:56:10 -07:00
bjorn
ae470d8804
Make registertype/extend type a macro;
...
Just a nice-to-have.
2019-04-05 03:48:36 -07:00
bjorn
6fdeda9e61
Make lovrRelease non-generic;
...
We know what type we're releasing 99% of the time, we don't need to
play a guessing game in lovrRelease, just have the caller say which
destructor to use.
There is lovrGenericRelease for situations where we need it, which
does the slower lookup of the destructor.
2019-04-05 03:41:03 -07:00
bjorn
7932ef6f9f
Add type lookup;
...
Now Ref has a type id instead of a destructor/name, and use the type to
lookup the destructor and name when needed.
This improves performance, since now Ref contains a lot less data and we
can do an integer comparison instead of a string comparison when reading
objects from Lua.
2019-04-05 02:54:54 -07:00
bjorn
64b7ee85f7
Fix rendering with vertexCount of 0;
2019-04-05 01:28:17 -07:00
bjorn
c2c4322e3b
Add drawMode to lovrModelDraw Batch;
2019-04-05 01:23:48 -07:00
bjorn
a28b333899
Split draw data stream into two streams;
...
Also the max number of draws can be hardcoded to 256 now.
2019-04-05 00:49:50 -07:00
bjorn
88b54a7ab9
Make cursors generic;
2019-04-05 00:49:50 -07:00
bjorn
efbc88073e
Write vertices at batch time;
2019-04-05 00:49:50 -07:00
bjorn
7409f34d36
lovr.graphics.getStats does a flush;
2019-04-01 07:37:05 +09:00
bjorn
ab42e2ca18
Fix bug when reading point/line/triangle primitive data;
...
- When reading points from a table of numbers, the array
indexing was not correct and vertex positions were not
getting correctly written.
- The normals/texture coordinates weren't getting written,
so their values were using whatever was in the buffer.
Now they are always set to zero.
2019-03-31 00:23:02 +09:00
bjorn
10305a4fed
Fix batching problem;
2019-03-25 11:36:29 +09:00
bjorn
793dca03d1
Fix resulting clang warnings;
2019-03-17 01:01:54 -07:00
bjorn
85c51399a6
Fix MSVC warnings;
2019-03-17 00:58:13 -07:00
bjorn
a9ca346ee1
Fix base path in model loaders;
2019-03-16 22:03:00 -07:00
bjorn
9744d95039
Fix snprintf warning;
...
There's a potential string truncation here if you have a uniform array with a really long name.
2019-03-16 19:43:04 -07:00
bjorn
7441456aab
Rename lovr.graphics.getSupported and getSystemLimits;
...
"Features" and "Limits" will be the standard terminology used now.
2019-03-14 21:24:25 -07:00
bjorn
25fe88b493
Limit UBO size in WebGL;
...
Currently glBindBufferRange does not seem to work properly if the
offset is bigger than the maximum size of a uniform buffer. The
size of the draw data buffer is being limited as a workaround.
2019-03-14 13:40:19 -07:00
bjorn
1d7e8519d6
Organize luax_setmainthread;
2019-03-14 13:36:51 -07:00
bjorn
12cf311490
Use mipmaps and filtering for OpenVR Canvas;
...
It leads to a prettier mirror window. There is some performance overhead, that can be dealt with as needed.
2019-03-13 20:44:15 -07:00
bjorn
bf5dd56254
vec3:add and vec3:sub accept numbers;
2019-03-13 20:36:50 -07:00
bjorn
8722b6e296
Improve Canvas attachment errors;
2019-03-13 09:35:28 -07:00
bjorn
c1705da8b7
Improve shader compilation error;
2019-03-13 09:31:06 -07:00
bjorn
e008ea7a28
Consistency;
2019-03-13 09:21:14 -07:00
bjorn
94ac64e7f4
Add std140 layout qualifier to DrawData block;
2019-03-13 09:20:33 -07:00
bjorn
ce20447260
Use proper ifdefs for LOVR_WEBGL;
2019-03-12 13:18:14 -07:00
bjorn
a14e15f856
Only fence when needed;
...
There appears to be some sort of problem where syncing on WASM and
Android leads to dropped frames. The only sync that causes this
problem is the delayed sync that occurs after rolling over a
buffer -- in that case the sync is often placed one frame late
once we realize that the rollover has occurred. I'm not sure if
this is a driver quirk or an improper use of glFenceSync but for
right now avoiding the fence on the problematic platforms fixes
the immediate issue.
2019-03-12 13:09:21 -07:00
bjorn
921d14014e
TextureData:setPixel supports more formats;
2019-03-11 13:36:22 -07:00
bjorn
cf5ad64deb
WebVR: Use new dynCall syntax for function pointers;
2019-03-09 03:00:50 -08:00
bjorn
b513990095
Allocate oculus mobile Canvas on stack;
2019-03-07 04:47:08 -08:00
bjorn
843a7b2462
Remove angle conversion in oculus_mobile;
...
Relies on a separate fix in lovr-oculus-mobile.
2019-03-07 03:20:23 -08:00
bjorn
9e6ead30e7
Oculus mobile formatting;
2019-03-07 03:19:50 -08:00
Bjorn Swenson
0927df8246
Merge pull request #116 from bjornbytes/headset-render-error
...
Refactor asynchronous headset render errors;
2019-03-07 01:24:09 -08:00
bjorn
9313394e22
Call coroutines T;
2019-03-07 01:19:40 -08:00
bjorn
b28face914
Handle coroutine stuff properly;
2019-03-07 01:04:45 -08:00
bjorn
e24a80685b
Update stb_image_write;
...
And disable stdio support for it, since it isn't needed.
2019-03-07 00:02:11 -08:00
bjorn
ce029cb5c5
Fix emscripten; Properly clear error on Android;
2019-03-06 23:17:29 -08:00
bjorn
569c9f7a11
Refactor asynchronous headset render errors;
...
It's now a more general error stored in the registry instead of
in a global variable. There are more helper functions.
2019-03-06 23:17:29 -08:00
bjorn
d45e56146a
Rename fake to desktop;
2019-03-06 23:02:47 -08:00
Bjorn Swenson
86ef954287
Merge pull request #111 from mcclure/oculus-fix-19feb
...
Fix Oculus driver compilation
2019-03-06 22:25:31 -08:00
bjorn
f1ff7bc38a
Use luax_setmainthread on Android;
2019-03-06 08:44:07 -08:00
bjorn
d340fc7aaa
Polyfill LUA_RIDX_MAINTHREAD;
...
Instead of using a static variable.
2019-03-06 08:42:32 -08:00
bjorn
d4c8382306
Fix improper istype calls in LuaJIT;
2019-03-05 02:45:46 -08:00