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
bjorn
55670ab408
rm trailing whitespace;
2019-03-05 02:29:21 -08:00
bjorn
3d928c1118
lovr.graphics.newMesh accepts Blob again;
2019-03-05 02:08:53 -08:00
bjorn
27e2c56bee
lovr.filesystem.read takes and returns byte count;
2019-03-05 01:59:31 -08:00
bjorn
d1c6b9d9c3
Improve error message for TextureData:getPixel and setPixel;
2019-02-28 19:35:32 -08:00
bjorn
a8e201d89e
TextureData:getFormat;
2019-02-28 19:29:30 -08:00
bjorn
5e0c2e531f
Source:getPose; Source:setPose;
2019-02-18 18:07:28 -08:00
bjorn
41dbf6115b
Source:getOrientation; Source:setOrientation;
2019-02-18 18:01:17 -08:00
bjorn
af155ff0c5
Ensure Blob size is positive;
2019-02-17 18:43:52 -08:00
bjorn
0cba1ba28d
lovr.audio.getPose; lovr.audio.setPose;
2019-02-17 18:26:56 -08:00
bjorn
075b71e58c
Collider:getPose; Collider:setPose;
2019-02-17 18:20:35 -08:00
bjorn
90d6e2b407
Make binding functions static;
2019-02-17 14:52:22 -08:00
bjorn
e05b835927
Fix prototypes;
2019-02-17 14:39:51 -08:00
bjorn
d529620fea
rm unused variables;
2019-02-17 14:19:39 -08:00
bjorn
581d1d7a74
Fix warnings;
2019-02-16 23:43:20 -08:00
bjorn
d0b189a8f5
v0.12.0;
2019-02-14 10:33:07 -08:00
bjorn
62bce139d3
Fix mat4 constructor;
2019-02-14 10:31:22 -08:00
bjorn
e80e806b9d
Always flush ShaderBlocks;
2019-02-14 10:20:19 -08:00
bjorn
241abb5b2b
Explicitly set generic int attribute for WebGL;
2019-02-14 10:11:10 -08:00
bjorn
1d3b05a515
Make bone IDs unsigned for WebGL;
2019-02-14 09:49:31 -08:00
bjorn
912dec3c78
Reduce clientWiatSync timeout for WebGL;
2019-02-14 09:43:49 -08:00
bjorn
a763a6d2e1
Fix emscripten entry/exit points;
2019-02-14 09:22:00 -08:00
bjorn
69b6e599e9
Re-add Model:getMaterial and Model:setMaterial;
2019-02-13 23:55:47 -08:00
bjorn
7c6accf856
Rebuild boot.lua;
2019-02-13 23:48:50 -08:00
bjorn
b9b719e862
Fix gamma correct issue with built-in Camera;
2019-02-13 21:14:45 -08:00
bjorn
b27b9be7bd
Just ignore unknown OBJ materials;
2019-02-13 20:53:30 -08:00
bjorn
016fc88199
Avoid isspace on MSVC;
2019-02-13 20:37:30 -08:00
bjorn
a081ab8aed
Update lovr.headset in the error screen;
2019-02-13 20:37:06 -08:00
bjorn
beeb1e8911
Handle more edge cases while parsing OBJ;
2019-02-13 20:11:39 -08:00
bjorn
be58911276
Fix several Mesh problems;
2019-02-13 17:20:43 -08:00
bjorn
6a443e0dca
rm assimp;
2019-02-13 15:10:52 -08:00
bjorn
a02d4eb659
rm VertexData;
2019-02-13 15:10:52 -08:00
bjorn
4373e29bea
OBJ groups/materials;
2019-02-13 15:10:52 -08:00
bjorn
6857b01ac0
Start OBJ parser; Optimize glTF parsing;
2019-02-13 15:10:52 -08:00
bjorn
9136c7e3c1
Model:getAABB;
...
It takes animated node transforms into account! But not skinning.
2019-02-13 15:10:52 -08:00
bjorn
a24d7e5447
Bugfixes during testing;
2019-02-13 15:10:52 -08:00
bjorn
9deab224da
Handle scene root properly;
2019-02-13 15:10:52 -08:00
bjorn
db391a7d68
Make cubic spline error more polite;
2019-02-13 15:10:52 -08:00
bjorn
a8edf89279
Mark base64 URIs as NYI;
2019-02-13 15:10:52 -08:00
bjorn
3911c9d7c8
Support animation names;
2019-02-13 15:10:52 -08:00
bjorn
d25f59582e
Handle missing textures better;
2019-02-13 15:10:52 -08:00
bjorn
0add9526ad
OpenVR Controller Models;
2019-02-13 15:10:52 -08:00
bjorn
2338e0ceb1
Change animator iteration;
2019-02-13 15:10:52 -08:00
bjorn
bea2140676
Animation optimization; Cleanup;
2019-02-13 15:10:52 -08:00
bjorn
09936a8ae2
Load animation names; General testing;
2019-02-13 15:10:52 -08:00
bjorn
a8566e2c7c
Load materials;
2019-02-13 15:10:52 -08:00
bjorn
fc55b5354d
Parse scenes;
2019-02-13 15:10:52 -08:00
bjorn
540b6a60e0
Refactoring;
2019-02-13 15:10:52 -08:00
bjorn
6bb569192f
Make sure bone indices are ints;
2019-02-13 15:10:52 -08:00
bjorn
d1fd59a176
rm string hashing code;
...
It doesn't work in Visual Studio.
2019-02-13 15:10:52 -08:00
bjorn
0a4344577e
Skinning work; Bugfixes;
2019-02-13 15:10:52 -08:00
bjorn
70dc871f88
More work on Animator;
2019-02-13 15:10:52 -08:00
bjorn
40b8b8da7c
Fix primitive restart overflow for u32 indices;
2019-02-13 15:10:52 -08:00
bjorn
d14af4a79c
Fix traversal;
2019-02-13 15:10:52 -08:00
bjorn
67f4aa0cb4
Fix samplers;
2019-02-13 15:10:52 -08:00
bjorn
ef12cdf3c2
Fix size calculation;
2019-02-13 15:10:52 -08:00
bjorn
1426b368b8
WIP;
2019-02-13 15:10:52 -08:00
bjorn
80b584aeb5
Compute global transforms better;
2019-02-13 15:10:52 -08:00
bjorn
80bb75968e
WIP animator rewrite;
2019-02-13 15:10:52 -08:00
bjorn
2692abb83c
Render nodes properly;
2019-02-13 15:10:52 -08:00
bjorn
b1b6ec0f6d
Parsing improvements;
2019-02-13 15:10:52 -08:00
bjorn
e8a2ac8063
Parse materials;
2019-02-13 15:10:52 -08:00
bjorn
c66a7468bb
Parse textures;
2019-02-13 15:10:52 -08:00
bjorn
39ce68f2be
Parse samplers;
2019-02-13 15:10:52 -08:00
bjorn
92aa1a234b
Parse images;
2019-02-13 15:10:52 -08:00
bjorn
4ed3cad851
Parse animations;
2019-02-13 15:10:52 -08:00
bjorn
6b323e3476
Start parsing glTF;
2019-02-13 15:10:52 -08:00
bjorn
50e86579c2
vec3:min; vec3:max;
2019-02-08 12:39:10 -08:00
mcc
41e621d006
Back out state.offset change in oculus
...
This makes rendering work correctly again, but now most likely state.offset does not work right.
2019-02-08 15:00:50 -05:00
mcc
6c152a5fc6
Fix Oculus driver compilation (still renders wrong)
2019-02-08 14:42:13 -05:00
bjorn
f34e6f86ea
Fix DepthFormat constant in oculus backend;
2019-02-08 10:57:35 -08:00
bjorn
f53f64933c
WebGL fixes;
2019-02-08 10:32:05 -08:00
bjorn
3c83b36845
LuaJIT: Add .name metafields for compatibility;
2019-02-08 08:13:47 -08:00
bjorn
4a25a0120f
Vector rework;
2019-02-08 08:13:47 -08:00
bjorn
3c08cfb278
Remove gl_FragCoord from fragment shader header;
...
This fixes a problem where shader compilers are complaining about
the "extension" declarations coming after the "in" declaration.
2019-02-08 07:15:20 -08:00
bjorn
d12d185e6c
Fix lovr.graphics.getPixelDensity when widths are zero;
2019-02-07 14:49:49 -08:00
bjorn
6f20126020
Fix bug with mesh divisors;
2019-02-05 15:57:22 -08:00
bjorn
0d81745282
Fix error screen;
2019-02-05 13:15:27 -08:00
bjorn
dc7f9cd0d5
lovr.graphics.getPixelDensity;
2019-02-05 12:46:48 -08:00
bjorn
f0a975b522
lovrGraphicsGetPixelDensity;
2019-02-05 12:46:48 -08:00
bjorn
17641fb7f0
Platform window functions accept NULL pointers;
2019-02-05 12:46:48 -08:00
bjorn
8e942561f1
Simplify CompareMode handling;
2019-02-01 15:10:12 -08:00
bjorn
85ab7c7c6e
Fix comment typo;
2019-02-01 14:44:13 -08:00
mcc
4859360209
Fix compile with -DLOVR_ENABLE_HEADSET=NO
2019-02-01 13:20:28 -08:00
bjorn
a2cceb0b56
Fix bad interaction between vaos and ibos;
2019-01-31 17:24:13 -08:00
bjorn
86977bd7bd
Don't use autoinstancing for stream batches;
2019-01-31 17:23:49 -08:00
bjorn
eae3669fea
Rebuild math.lua.h;
2019-01-31 13:54:54 -08:00
bjorn
a1361fcd41
mat4:unpack accepts raw flag; rm redundant functions;
2019-01-30 16:18:08 -08:00
bjorn
0eb2789a2d
Improve mat4:set;
...
Ended up removing the diagonal variant, sorry holo.
2019-01-30 16:13:44 -08:00
bjorn
3d4cb166bc
Add quat:length;
2019-01-30 00:56:57 -08:00
bjorn
3b000e64a1
Call the proper GLES2Loader in GLES;
2019-01-29 22:04:15 -08:00
bjorn
b78e7a15bb
Add OpenGL ES support to glad header;
2019-01-29 22:04:15 -08:00
bjorn
bf89216997
Explicitly convert lua_Numbers to floats;
2019-01-29 22:04:04 -08:00
bjorn
03e3e14718
Font:setFlipEnabled; Font:isFlipEnabled;
2019-01-29 21:49:49 -08:00
bjorn
f5a903a805
Oops, use calloc in _lovrAlloc;
2019-01-29 20:08:10 -08:00
bjorn
3aec7f7767
Fix struct definition in UBO;
...
You can't define a new struct in an interface block.
2019-01-29 19:57:18 -08:00
bjorn
6291a5ad5a
Always check malloc result; Less calloc;
...
Some more questions:
- Should there be some kind of allocation helper so you don't need
to always check the result?
- Throwing an error on OOM is convenient and is probably correct 90%
of the time, it even provides a nice error message instead of a
nil dereference somewhere. But it's inflexible. Is it the right
thing to do?
2019-01-29 16:53:01 -08:00
bjorn
5d29ec2db1
Curve supports vec3;
2019-01-29 16:33:44 -08:00
bjorn
a878139e26
rm math out args;
...
Needs more consideration before it can be added at the desired quality level.
2019-01-29 16:05:48 -08:00
bjorn
6c5ceabe02
Fix quat:set(nil) in vanillua;
2019-01-29 16:05:48 -08:00
bjorn
dac289d624
mat4:__mul works with vec3 in vanillua;
2019-01-29 16:05:48 -08:00