bjorn
f2feda9420
oculus: Remove offset;
...
Since we are calling SetTrackingOriginType with floor level, we don't
need to apply the seated-level t.headset.offset adjustment.
2019-07-05 01:05:02 -07:00
bjorn
348798b86c
Make shader in nogame screen more correct;
2019-07-02 20:12:24 -07:00
mcc
dc98846169
Fix error screen on Android
...
As discussed in slack, lovr.errhand appears to predate lovr.graphics.hasWindow() and does not use it. This resulted in a crash on Oculus Go
2019-07-02 18:45:08 -07:00
mcc
53270fbd76
mat4_transform_project in maf.h
...
mat4_transform ignores the final row of the matrix, which normally contains scale data. This is fine for modelview matrices, which is all lovr currently uses mat4_transform for. However it fails if you ever use mat4_transform on a projection matrix.
mat4_transform_project takes the final row into account, so you can use it with projection matrices. This was useful in my fork and might be useful to have around in lovr someday later.
2019-07-02 13:37:33 -07:00
mcc
1b085a00ea
As discussed in slack, Oculus should be letting lovrCanvasCreate decide whether to double
2019-07-02 13:28:36 -07:00
bjorn
57f97056da
Use I4ui instead of I1ui for lovrDrawID constant value;
...
glVertexAttribI1ui isn't supported on GLES for some reason.
2019-07-02 12:51:36 -07:00
bjorn
2d6aa18069
Be a little more correct about when draw id is written;
2019-07-02 00:14:01 -07:00
bjorn
775cf5cda1
Don't accidentally draw meshes too many times;
...
Oops!
2019-07-02 00:09:43 -07:00
bjorn
44da36b610
Write draw ids at the right time (fix flicker);
2019-07-01 02:47:59 -07:00
bjorn
2fb393306c
rm skybox args;
...
They used to always be necessary, now they are almost never necessary.
2019-06-29 21:01:03 -07:00
bjorn
e3e930d6cc
Set index buffer at the right time;
...
Just a small ordering issue with previous commit.
2019-06-29 20:39:01 -07:00
bjorn
6256acfc6d
Ahhh fix everything;
...
- If you have an instanced batch, it will use the instanced mesh. That
has a drawID attribute that uses the identity buffer, which has a vertex
divisor. BUT if you only have one instance, then we won't emit an
instanced draw, and the use of a divisor'd attribute w/ a non-instanced
draw is causing mega problems on macOS.
- This also fixes observed macOS bugs like:
- Needing to have a small UBO
- Flickering at startup
- Flicker when writing to the last byte of a UBO
- etc.
- Also make the generic attribute value for lovrDrawID more correct (scalar instead of vector).
2019-06-29 20:24:36 -07:00
bjorn
afe4d8c0e3
Fix GL error with buffer unmapping;
...
This doesn't seem to fix any of the macOS rendering bugs though...
2019-06-29 20:08:31 -07:00
bjorn
d3f08fd1f0
rm logo.png;
2019-06-29 18:28:20 -07:00
bjorn
b2df3e9816
Update nogame screen;
...
- Slightly dim background color (may change).
- Use a shader for the logo (it's centered now, not quite 100% like the image).
- Adjust text optical weight (I hate it).
2019-06-29 18:27:55 -07:00
bjorn
e82ba030a6
lovr.headset.getDisplayTime;
...
Returns the predicted display time, which is the estimated time at which
the photons of the next frame will hit the eyeballs of a person in the HMD.
This should be used instead of lovr.timer.getTime when used for rendering
something that is time-dependent. Updating simulations, logic, or access
to high frequency times should still use lovr.timer.getTime.
2019-06-29 17:36:36 -07:00
bjorn
8faff22f38
Regenerate math.lua.h;
2019-06-28 22:07:31 -07:00
mcc
c604149428
Y-flip mirror texture on Oculus
...
Oculus gives us the mirror texture "upside down" compared to every other driver, so flip it rightside up before drawing in boot.lua.
2019-06-28 22:46:23 -04:00
bjorn
d87fc56b63
lovr.headset.getDisplayMask;
2019-06-28 00:13:45 -07:00
bjorn
4222be88b5
Use UBO for Camera matrices;
...
Ugh I don't like the "Camera" concept anymore, but I can't figure
out how to easily get rid of it. Maybe wait till displays are a thing.
2019-06-27 22:17:50 -07:00
bjorn
fa6c4a6b39
Organization;
2019-06-27 21:04:15 -07:00
bjorn
370124c88d
Batching cleanup;
...
- Rename drawMode to topology in some places.
- Batch uses DrawCommand internally to simplify stuff.
- Do less work while flushing.
- Store global head/tail cursors instead of unused per-batch cursors.
2019-06-27 20:58:42 -07:00
bjorn
779949964f
More small batching changes;
...
- Reduce number of batches to 4. Yeah it's arbitrary, will monitor.
- Just use memcmp for BatchParams. Since we're using designated initializers,
we aren't running into issues with memcmp+struct padding bits, and in the
event it does lead to false positives on some platforms, at worst we'll just
experience a harmless reduction in batching efficiency.
2019-06-27 19:05:54 -07:00
bjorn
6da17b0a91
Optimize gamma correction;
...
Currently, we gamma correct colors on every clear and every draw.
It's taking a lot of time. Instead, we'll gamma correct colors
when they're changed using lovr.graphics.setColor/setBackgroundColor.
2019-06-27 15:41:57 -07:00
bjorn
7e067da8e7
Add defaultCanvas;
...
Having a normal Canvas object that represents the backbuffer reduces
some indirection where we have to last-minute check if a Canvas is
set. It also means that all of the draw-related info that was _sometimes_
on the Canvas is now _always_ on the Canvas, which reduces the amount
of redundant information we need to provide for a draw call.
There may be some issues related to changing the width/height/stereo
of the default Canvas.
2019-06-27 15:36:51 -07:00
bjorn
26e474bcfc
Simplify Mesh handling;
...
Removes some indirection from flush (I guess moves it into batch,
not sure what's better).
2019-06-27 14:14:31 -07:00
bjorn
551dea8c86
Adjust includes;
2019-06-27 13:44:09 -07:00
bjorn
b8e63adcbf
graphics: Cleanup;
...
Make batching structs and defines private.
2019-06-27 13:38:38 -07:00
bjorn
fe21de403b
lovrGraphicsDrawMesh;
2019-06-27 13:35:43 -07:00
bjorn
b3080ae5d9
rm macos instancing hack;
...
I haven't been able to see adverse affects from it anymore. Can
always put it back if it resurfaces.
2019-06-27 13:27:43 -07:00
bjorn
39b0d2d754
graphics: Minor refactoring;
2019-06-27 13:26:39 -07:00
bjorn
297208c205
Minor cleanup to stream buffer code;
2019-06-27 13:01:04 -07:00
bjorn
052990aa47
Make some graphics structs private;
2019-06-27 01:48:35 -07:00
bjorn
2baa8d03ee
Make singlepass detection more readable;
2019-06-26 21:47:22 -07:00
bjorn
adf5e69ea1
oculus: Remove unused variable;
2019-06-26 14:51:32 -07:00
mcc
fc90a03584
Fix MSVC-specific warnings
2019-06-25 19:16:48 -07:00
mcc
430fbc27d5
ovrHand -> ovrHandType in oculus.c. We don't understand how this worked before but it fixes the oculus-windows build.
2019-06-25 19:16:48 -07:00
bjorn
6b2de4a0a1
Temporary implementation for persistent buffer discard;
...
Should fix potential crashes with persistent buffers.
2019-06-25 19:16:08 -07:00
bjorn
010bbff519
openvr: Fix stereo Canvas dimensions mismatch;
...
(The width is automatically doubled when stereo now)
2019-06-25 19:15:38 -07:00
bjorn
312a7617c3
Fix typo in shader;
2019-06-25 19:15:11 -07:00
bjorn
09b6f74acf
Native textures: initialize mipmapCount;
2019-06-25 18:59:31 -07:00
bjorn
749774e2fc
Native texture depth must be explicitly specified;
...
To fix validation errors when attaching them to Canvases.
2019-06-25 18:57:18 -07:00
bjorn
7e65116add
Fix oculus backend;
2019-06-25 18:16:54 -07:00
bjorn
a3d5371d01
rm lib/vec/vec from oculus.c;
2019-06-25 18:07:56 -07:00
bjorn
928ccee5f1
Multiview;
2019-06-25 01:21:59 -07:00
bjorn
a691192af9
lovrBufferDiscard;
2019-06-25 01:21:59 -07:00
bjorn
5cd93b66c6
rm fence syncs;
...
They are too buggy and are not as efficient as orphaning.
2019-06-24 19:17:55 -07:00
bjorn
b17d01e4aa
Don't return NULL from mat4_invert;
2019-06-22 17:25:48 -07:00
bjorn
8d2f005bf3
Add stdlib.h to oculus_mobile;
2019-06-21 11:28:40 -07:00
bjorn
9f3638b018
TextureData:paste;
2019-06-20 23:36:18 -07:00
bjorn
7ebee200ea
rm strdup;
...
It isn't part of C, causing compiler errors on some platforms.
2019-06-20 22:21:31 -07:00
bjorn
879c789a08
Polyfill M_PI;
...
It technically isn't part of C, which is causing problems on some systems.
2019-06-20 21:43:40 -07:00
bjorn
807c519397
Fix typo;
2019-06-20 21:36:07 -07:00
bjorn
b6d65922af
Standard shader: spherical harmonics irradiance;
2019-06-20 21:17:32 -07:00
bjorn
286cb711e4
Standard shader: emissive;
2019-06-20 18:22:49 -07:00
bjorn
a9241e781b
Standard shader: emissive;
2019-06-20 18:20:07 -07:00
bjorn
179071023f
Standard shader: diffuse, specular, normal mapping;
...
No shader flags yet. Still need occlusion, emissive, configurable
lighting, IBL.
2019-06-20 17:46:22 -07:00
bjorn
b54f68a3d5
glTF: Support Textures with missing images and samplers;
2019-06-20 17:44:30 -07:00
bjorn
5881bdd5b1
Fix gpu timer array;
2019-06-20 14:44:28 -07:00
bjorn
4611b1c9a3
Add no-op standard shader;
2019-06-20 14:21:35 -07:00
bjorn
612f699aa4
Rename default shader to unlit;
2019-06-20 14:09:55 -07:00
bjorn
c10851d726
Fix tostring;
2019-06-20 13:47:43 -07:00
bjorn
d856f6d592
opengl: Create default texture at startup;
...
More predictable performance, fixes an obscure bug.
2019-06-20 11:35:46 -07:00
bjorn
6b2d06e766
Add lovrPlatformOpenConsole;
2019-06-16 18:55:43 -07:00
bjorn
eb1e257209
Add new array implementation; Upgrade filesystem;
...
Filesystem:
- Uses streaming file IO.
- Uses less memory when requiring files.
- Simplifies its require path implementation.
2019-06-16 13:30:30 -07:00
bjorn
f8f6d98df4
Use better default for identity quat;
2019-06-14 15:04:17 -07:00
bjorn
9e42fe295a
math.lua: Fix vec3:sub;
2019-06-14 13:30:07 -07:00
bjorn
9c322495fa
Fix bug when reading mat4s;
2019-06-14 13:22:13 -07:00
bjorn
2f3c23ed7e
Ensure getHands uses 4-element vec3;
2019-06-14 13:04:10 -07:00
bjorn
79083c7df1
Fix warnings on newer versions of gcc;
2019-06-11 19:57:20 -07:00
bjorn
909ee1ad79
Use highp in vertex shaders on GLES;
2019-06-10 08:12:36 -07:00
bjorn
de6d3dab5b
Add tup build system;
...
It's still a rough draft and likely only works on my machine, but can be
improved over time.
Rough explanation:
- tup.config contains high-level build configuration defaults.
- Tuprules.tup contains mostly compiler flags (generated from the
tup.config) and declares some macros used to compile code.
- Tupfile takes all generated object files and links them into the
lovr executable.
- src/Tupdefault defines the default build steps for src and all
subdirectories, which is to compile all .c files to .o files and put
them in the <objects> bucket for linking by the toplevel Tupfile.
It's possible to have multiple configs active at once for different
platforms, projects, etc. To do this, create a folder for each build
variant you want, and place a tup.config in each folder (it can be a
symlink, which is helpful). Then, invoking `tup` will build all your
variants, or you can build a specific one by doing `tup <foldername>`.
2019-06-10 04:06:22 -07:00
bjorn
31a1dc6cee
Details;
2019-06-10 03:39:53 -07:00
bjorn
e9853ed3c7
t.math.ffi conf flag;
2019-06-10 00:11:20 -07:00
bjorn
98f4365474
Add astc and dxt GraphicsFeatures;
2019-06-09 23:59:57 -07:00
bjorn
b0a7d5c122
ASTC textures;
...
I like typing numbers.
2019-06-09 09:11:29 -07:00
bjorn
0b5c609264
Add OpenVR touch bindings;
...
Untested.
2019-06-06 01:10:50 -07:00
bjorn
5551f76557
Reset render data when restarting in oculus_mobile;
...
Fixes a crash where rendering would occur with the old Lua state
after a restart.
2019-06-05 20:23:21 -07:00
bjorn
c0f4e2848b
Update android build;
2019-06-05 20:22:51 -07:00
bjorn
0c75f40793
rm the other restrict;
...
I guess it just isn't portable.
2019-06-04 04:43:02 -07:00
bjorn
feae7bdf3a
rm extra restrict qualifier;
...
Maybe this is confusing MSVC. Doesn't appear to impact codegen.
2019-06-04 04:20:23 -07:00
bjorn
d1f754d5f9
Fix Model memory leaks;
2019-06-03 08:13:42 -07:00
bjorn
06c6b172de
vec3 has 4 elements;
2019-06-03 07:20:03 -07:00
bjorn
31e086edaf
Inline all the maf functions;
2019-06-03 07:19:25 -07:00
bjorn
4eb03006d7
Fix SoundData loading;
2019-06-03 00:29:41 -07:00
Bjorn Swenson
68c1b6a201
Merge pull request #122 from bjornbytes/hand-updates
...
Hand updates
2019-06-03 00:14:45 -07:00
bjorn
dc34ed4570
Start to trend towards 4-element arrays for vec3;
...
It will be important for enabling more SIMD.
2019-06-02 20:35:52 -07:00
bjorn
c7a2e513d3
Inline hash function;
2019-06-02 04:15:46 -07:00
bjorn
575552a147
Restart hotkey works on default error screen;
2019-06-02 03:29:34 -07:00
bjorn
374492c586
Add experimental hotkeys flag;
...
- Add t.hotkeys flag to conf.lua, which defaults to true.
- If t.hotkeys is truthy, the following hotkeys will be enabled:
- Escape: Quit the experience
- F5: Restart the experience
2019-06-02 03:00:12 -07:00
bjorn
cf7a738a9f
Fix openvr.c;
2019-06-02 02:27:19 -07:00
bjorn
83c2d3ceef
Optimize timer module slightly;
2019-06-02 02:02:15 -07:00
bjorn
22fe333150
Update refcounting (again);
...
- Ref struct only stores refcount now and is more general.
- Proxy stores a hash of its type name instead of an enum.
- Variants store additional information instead of using a vtable.
- Remove the concept of superclasses from the API.
- Clean up some miscellaneous includes.
2019-06-02 01:02:26 -07:00
bjorn
d2bff7d239
lovr.graphics.tick and tock;
...
Initial support for GPU timer queries.
2019-06-01 17:29:53 -07:00
bjorn
84bd50379d
Add primary button/axis;
...
It's called "primary".
2019-05-31 12:00:15 -07:00
bjorn
7ac3d6938b
rm TRACKER devices for now;
...
This is not the correct way to expose them. It doesn't seem like
there is consensus on how to expose them yet. At the very least
LÖVR should instead use the hardcoded OpenVR tracker paths like
/camera, /keyboard, /foot/left, /foot/right, etc.
See these issues:
- https://github.com/ValveSoftware/openvr/issues/1030
- https://github.com/ValveSoftware/openvr/issues/962
2019-05-31 10:57:29 -07:00
bjorn
9674276ff7
Add lovr.headset.getHands;
...
The iterator is nice and concise, but a table is more conventional
and allows you to easily retrieve the number of tracked hands. The
iterator version may be removed in favor of the table version, since
you can always iterate over a table yourself.
2019-05-31 10:52:31 -07:00
bjorn
af0678f9e9
rm DEVICE_HAND;
...
If we expose both unhanded hands and handed hands, people need to
deal with handling (haha) both cases in their apps. It's simpler
to always deal with left and right hands, even though it is a bit
less general. Still, this is congruent with the current state of
OpenVR and OpenXR, and I think there are still open questions about
the more uncommon cases where there are more than two hands.
2019-05-31 10:41:40 -07:00
bjorn
fe559903e1
Oculus Go controller has handedness;
2019-05-31 10:37:43 -07:00
bjorn
d11e9be175
Lua userdata store their destructor in their metatable;
2019-05-28 16:31:13 -07:00
Bjorn Swenson
5ec6f1d1d1
Merge pull request #120 from mcclure/oculus-quest
...
Oculus quest support
2019-05-28 16:30:17 -07:00
mcc
1449d4c914
Oculus mobile: Support getAcceleration
2019-05-28 18:59:05 -04:00
bjorn
06e3ef702c
Add built-in ShaderFlag for skinning vertices;
...
Now you can pass in the { skinned = true } flag when creating a Shader
to get skinning behavior without needing to write it yourself. The
default is still false.
Need to profile to make sure the if is getting optimized out.
2019-05-28 03:43:54 -07:00
bjorn
c5210deae8
Fix ShaderFlag parsing;
2019-05-28 03:43:12 -07:00
bjorn
f3d31cf4ef
Add multiview and timer query extensions;
2019-05-28 03:14:08 -07:00
bjorn
1cfc2adf4a
Fix typo;
2019-05-28 02:45:08 -07:00
bjorn
6b439327fa
Make refcounts atomic;
2019-05-28 02:43:15 -07:00
bjorn
29b2420dea
Work around macOS flicker bug;
...
At this point I don't know if maybe I'm just using UBOs wrong but whatever.
2019-05-27 19:05:47 -07:00
bjorn
4221c547d7
glTF: Add support for base64 buffer data;
2019-05-26 21:13:59 -07:00
bjorn
56f4c812ce
Small intermediate fix for models without animators;
2019-05-26 21:12:07 -07:00
bjorn
d08c454f46
Fix sign issue in rasterizer;
...
Fixes missing glyphs.
2019-05-26 12:51:25 -07:00
mcc
f4189d13e8
Oculus Mobile fixes: Fix potential crash, fix touches on Go after Quest changes
2019-05-26 11:17:49 -04:00
mcc
991b35a628
Oculus mobile: revamp bridge to support Oculus Quest
2019-05-26 10:29:42 -04:00
bjorn
0b8bc4145e
openxr: Begin the session at the correct time;
2019-05-25 20:15:42 -07:00
bjorn
b26e29cb7b
Fix more LuaJIT math casts;
2019-05-24 20:54:38 -07:00
bjorn
831ebda303
Fix LuaJIT Pool integration;
2019-05-24 20:39:05 -07:00
bjorn
d5ad10f408
Permit symbolic links in lovr.filesystem;
...
If needed, it can be made configurable later.
2019-05-24 19:16:43 -07:00
bjorn
9b6f7c35b4
Fix lovr.headset.isTouched;
2019-05-24 15:14:20 -07:00
bjorn
3bf08f0ca3
Add the ability to create default shaders;
...
lovr.graphics.newShader('font')
2019-05-22 18:00:02 -07:00
bjorn
c464bde609
Add DefaultShaders enum;
2019-05-22 16:36:40 -07:00
bjorn
db5076a100
Rename SHADER_DEFAULT to SHADER_UNLIT;
2019-05-22 16:34:57 -07:00
bjorn
3dc4d06285
Fix eye enum;
2019-05-22 14:37:46 -07:00
bjorn
698466d19c
Add missing include in animator.h;
2019-05-21 00:32:20 -07:00
bjorn
5b1e281d4c
Switch to a fork of LuaJIT that supports android;
2019-05-21 00:26:21 -07:00
bjorn
3804a1c0ee
lovrPlatformGetName;
...
Used in lovr.getOS.
2019-05-20 20:44:39 -07:00
bjorn
4cc154fdfa
More number conversions;
2019-05-20 20:35:07 -07:00
bjorn
e4c32d2f08
Fix oculus_mobile api.h include;
2019-05-20 15:17:38 -07:00
bjorn
e87b81e34a
Fix android platform include order;
2019-05-20 15:16:27 -07:00
bjorn
a9972a88de
Fix oculus_mobile_bridge include path;
2019-05-20 15:15:10 -07:00
bjorn
e8a8f6718e
Fix vrapi_getAxis;
2019-05-20 15:13:05 -07:00
bjorn
df6b7fc96a
Ref is mostly private now;
...
It's really nice how objects don't need to care about how they're
allocated/managed now.
2019-05-20 15:09:06 -07:00
bjorn
57aad490ae
Start sized int conversions;
2019-05-20 14:34:03 -07:00
bjorn
c31853a1d4
Fix build;
2019-05-20 14:31:46 -07:00
bjorn
67b76e08c2
Details;
2019-05-20 04:15:24 -07:00
bjorn
e368723248
Improve platform-specific defines;
2019-05-20 04:05:39 -07:00
bjorn
67ddefd0c2
Ensure platform functions have prefix;
2019-05-20 04:02:25 -07:00
bjorn
b1e848ef6b
Cleanup filesystem module;
2019-05-20 03:51:22 -07:00
bjorn
1335ab55ae
Warnings/cleanup;
2019-05-20 03:41:12 -07:00
bjorn
7645f4c014
Add core folder;
2019-05-20 02:47:33 -07:00
bjorn
a17f10e273
Add modules folder;
2019-05-19 00:38:35 -07:00
bjorn
4a47afca38
Organize api folder;
2019-05-19 00:31:42 -07:00
bjorn
79ba7a7ad5
gltf: Support partially-keyed animation properties;
2019-05-18 22:19:28 -07:00
bjorn
8d1b335da4
More mapping fixes;
2019-05-18 21:34:36 -07:00
bjorn
440b30df59
Add filter/wrap to default texture;
2019-05-18 04:33:28 -07:00
bjorn
1792f066f2
Fix CMakeLists; Fix buffer unmapping; Formatting;
2019-05-18 01:09:06 -07:00
bjorn
e3e52a7808
Fix issue when animated model has no animator;
2019-05-18 00:30:43 -07:00
bjorn
976d59e364
Undo single-translation-unit experiment for now;
2019-05-17 16:29:24 -07:00
bjorn
6f7c30e7e2
Single-translation-unit experiment;
2019-05-15 12:05:56 -07:00
bjorn
1aef9963f5
Clean up thread module;
2019-05-14 04:43:38 -07:00
bjorn
a4e563fe6f
Clean up event module;
2019-05-14 04:37:56 -07:00
bjorn
3267bad4fa
Add ShaderFlags;
...
newShader and newComputeShader accept an optional options table
that can contain a table of flags. Flags are turned into #defines
in the shader source and can be used as specialization constants in
the future.
Currently they can only be bools and ints. This might change to add
float and/or remove bools.
2019-05-14 03:48:01 -07:00
bjorn
6134abe866
Handle vsync better;
...
- Add vsync flag to t.window and lovr.graphics.createWindow.
- vsync is 1 by default.
- Some headset drivers override vsync if they have special timing requirements.
2019-05-14 00:18:22 -07:00
bjorn
15c4b6fcd2
Fix me ifdefs;
2019-05-13 20:52:11 -07:00
bjorn
f786c40b4e
Rework Buffer updates;
...
Use unsynchronized mapped buffers on macOS.
Reduce amount of Buffer flushes and stalls by flushing once per
batch instead of once per draw.
2019-05-13 20:35:21 -07:00
bjorn
b8ed63fcc4
Fix double/float conversions;
2019-05-13 04:28:57 -07:00
bjorn
566cd20984
Cleanup;
2019-05-13 04:25:34 -07:00
bjorn
69260cfbb3
openvr: rm state.rift;
...
Yay actions?
2019-05-13 04:25:34 -07:00
bjorn
8e7a4323d0
rm custom PI define;
2019-05-13 03:56:34 -07:00
bjorn
83b8ee2d08
Audio cleanup;
2019-05-13 03:53:17 -07:00
bjorn
97e3774718
Make TimerState private;
2019-05-13 03:35:41 -07:00
bjorn
963f496ac1
Lua hides a Type in its userdata;
2019-05-13 03:21:11 -07:00
bjorn
429efcb38d
Change circle size argument from diameter to radius;
2019-05-12 23:34:04 -07:00
bjorn
51ce0c1418
rm compat;
2019-05-12 22:28:02 -07:00
bjorn
7c2a119324
SteamVR Input
2019-05-12 22:23:28 -07:00
bjorn
c20554645e
Initial KTX support;
2019-05-12 22:23:28 -07:00
bjorn
5b0fa8b522
Fix warnings;
2019-05-12 22:23:28 -07:00
bjorn
9a1579a773
Ensure maf symbols are exported on unix;
2019-05-12 22:23:28 -07:00
bjorn
db3c3dbb1e
Fix lovr.headset.hands;
2019-05-12 22:23:28 -07:00
bjorn
ebcdc6d36e
Ensure bone pose gets reset when not animating;
2019-05-12 22:23:28 -07:00
bjorn
28c453075a
Fix batching overflow;
2019-05-12 22:23:28 -07:00
bjorn
511afef0c6
Fix batching issue with non-instanced primitives;
2019-05-12 22:23:28 -07:00
bjorn
6ff35420bd
More leap fixes;
...
Also reduce branching in headset accessors.
2019-05-12 22:23:28 -07:00
bjorn
06b8b6f405
Leap fixes;
2019-05-12 22:23:28 -07:00
bjorn
26c1859531
Update WebVR;
2019-05-12 22:23:28 -07:00
bjorn
9382afb94d
Put controller models back on nogame screen;
2019-05-12 22:23:08 -07:00
bjorn
2ecae65925
trackpad -> touchpad;
...
Sorry
2019-05-12 22:23:02 -07:00
bjorn
57321db2cd
lovr.headset.getDriver accepts devices;
2019-05-12 22:23:02 -07:00
bjorn
5413f6a427
Device iterators;
2019-05-12 22:23:02 -07:00
bjorn
7807b1abd7
lovr.headset.getAcceleration, getAngularAcceleration;
...
Add missing getBonePose impls.
Refactor some ovr stuff.
2019-05-12 22:23:02 -07:00
bjorn
b6e1e5e3b0
lovr.headset.getBonePose; Device shorthands;
2019-05-12 22:23:02 -07:00
bjorn
05f4ba7342
Change everything;
...
Use enums because they make things easier.
2019-05-12 22:23:02 -07:00
bjorn
1d079f0c95
Fix desktop_isDown;
2019-05-12 22:23:02 -07:00
bjorn
e21b64155a
Re-prefix headset backend function names;
2019-05-12 22:23:02 -07:00
bjorn
89ccf750ba
Start compat system;
2019-05-12 22:23:02 -07:00
bjorn
4b3e72a5f1
Fix warnings;
2019-05-12 22:22:29 -07:00
bjorn
2aace190fe
Add oculus:getDisplayTime;
2019-05-12 22:22:29 -07:00
bjorn
5947a96556
Fix getDisplayTime prototype;
2019-05-12 22:22:29 -07:00
bjorn
c2fc7daf2d
Split mat4_getTransform;
2019-05-12 22:22:29 -07:00
bjorn
801f997b0a
Use vectors for headset pose accessors;
2019-05-12 22:22:29 -07:00
bjorn
344edd8c30
Add missing OpenXR string constant;
2019-05-12 22:22:29 -07:00
bjorn
dafa7fefbe
Fix setTransform;
2019-05-12 22:22:29 -07:00
bjorn
5ff8e51d88
Add openxr:getDisplayTime;
2019-05-12 22:22:29 -07:00
bjorn
ed725927c3
OpenXR headset backend;
2019-05-12 22:22:29 -07:00
bjorn
aa1d33669c
Just use leap;
2019-05-12 22:22:29 -07:00
bjorn
e22d98e09e
Finish Leap backend;
2019-05-12 22:22:29 -07:00
bjorn
5ff49e73c2
Leap WIP;
2019-05-12 22:22:29 -07:00
bjorn
400598735c
rm isTracked for now;
2019-05-12 22:22:29 -07:00
bjorn
df5de9a35e
Use strings for paths;
...
It's probably slower, but it's way less complicated, so it seems like
a win for now. Can implement compile-time hashing, tries etc. later
if it's identified as a performance issue for a real person.
Also a bunch of cleanup in openvr.c and oculus.c.
2019-05-12 22:22:29 -07:00
bjorn
45931d005a
lovr.headset.isTracked;
2019-05-12 22:22:29 -07:00
bjorn
bb06b211cd
Add missing getDirection binding;
2019-05-12 22:22:29 -07:00
bjorn
5c6163580b
rm unused headset.h;
2019-05-12 22:22:29 -07:00
bjorn
d8581106d4
Support Vive trackers again;
...
/trackers/1
2019-05-12 22:22:29 -07:00
bjorn
ca30991b2a
"VR Simulator" -> "Simulator";
2019-05-12 22:22:29 -07:00
bjorn
85d461e71c
Fixup lovr.headset.getName;
2019-05-12 22:22:29 -07:00
bjorn
50e77fc023
Combine getVelocity and getAngularVelocity impls;
2019-05-12 22:22:29 -07:00
bjorn
a9ef3656a1
lovr.headset.getDirection;
2019-05-12 22:22:29 -07:00
bjorn
965f39f834
Do less work in lovr.headset.getPosition/getOrientation;
2019-05-12 22:22:29 -07:00
bjorn
9a8b119a81
Add missing enum;
2019-05-12 22:22:29 -07:00
bjorn
42ba6ddbb9
oculus_mobile build fixes;
2019-05-12 22:22:29 -07:00
bjorn
7a5ae2bfe1
Update oculus_mobile backend;
2019-05-12 22:22:29 -07:00
bjorn
77f848ea8f
Update oculus backend;
2019-05-12 22:22:29 -07:00
bjorn
f5b976cfae
Actually read paths in API;
2019-05-12 22:22:29 -07:00
bjorn
e406678b1c
rm luax_pushpath;
2019-05-12 22:22:29 -07:00
bjorn
2584809c23
Reorganize path enum;
2019-05-12 22:22:29 -07:00
bjorn
4edb8de0b0
Shorten path enum prefix;
2019-05-12 22:22:29 -07:00
bjorn
86537141ac
Add eye path;
2019-05-12 22:22:29 -07:00
bjorn
b42c3ffc0e
Rename hands to hand;
2019-05-12 22:22:29 -07:00
bjorn
6182ce59af
Cleanup;
2019-05-12 22:22:29 -07:00
bjorn
4e8d64a1a3
Cleanup;
2019-05-12 22:22:29 -07:00
bjorn
60d2111937
Add proximity to Subpaths;
2019-05-12 22:22:29 -07:00
bjorn
87d3c2742c
Drop static function prefixes;
2019-05-12 22:22:29 -07:00
bjorn
b0067233f7
getType -> getName;
2019-05-12 22:22:29 -07:00
bjorn
b9c5dce584
re-add proximity sensor button;
2019-05-12 22:22:29 -07:00
bjorn
fd985c95ff
rm isMounted;
2019-05-12 22:22:29 -07:00
bjorn
da6fd4d07c
Remove Controllers;
2019-05-12 22:22:29 -07:00
bjorn
bd609fc338
rm Controller:getHand;
2019-05-12 22:21:06 -07:00
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
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
bjorn
9839277e8d
Fix quat:mul edge case;
2019-01-29 16:05:48 -08:00
bjorn
c08cb664e7
mat4:mul;
2019-01-29 16:05:48 -08:00
bjorn
30acdd1347
Add semantic GL defines;
2019-01-29 16:05:27 -08:00
bjorn
6be9bf4911
Fix primitive restart on GLES;
2019-01-29 16:05:27 -08:00
bjorn
6c961bb404
rm math copy functions;
...
They are redundant.
2019-01-29 03:57:11 -08:00
bjorn
1bd58d6cef
Rebuild boot.lua;
2019-01-29 02:07:34 -08:00
bjorn
b37fc5dbbe
Remove fixed-function mirroring code from headset drivers;
2019-01-28 18:29:50 -08:00
bjorn
f2cb7e7e3d
Reset color to white after drawing nogame screen;
2019-01-28 18:21:46 -08:00
mcc
b09c3adeec
Fixes to lovr.mirror() requested in PR
2019-01-28 15:03:58 -08:00
mcc
aab1bda92d
Implementation of getMirrorTexture()
2019-01-28 15:03:58 -08:00
mcc
95fcc3eb0b
Attempt to make a lovr.mirror() for Window purposes as discussed in chat.
...
Adds lovr.graphics.hasWindow()
2019-01-28 15:03:58 -08:00
bjorn
b410227990
Font:getRasterizer; Font:setPixelDensity(nil);
2019-01-25 12:54:11 -08:00
bjorn
6fd4b9ef4c
Header cleanup;
2019-01-24 17:43:25 -08:00
bjorn
5770b63108
Revert "Add stb_sprintf;"
...
This reverts commit da565296fd
.
2019-01-24 17:40:22 -08:00
bjorn
cb9f166234
Revert "Replace sprintf with stb version;"
...
This reverts commit 8f9d24c51f
.
2019-01-24 17:39:27 -08:00
bjorn
bf19fd5c15
Avoid more implicit float-double conversions;
2019-01-24 17:00:41 -08:00
bjorn
bda248b86e
Be more intentional about doubles vs. floats;
2019-01-24 16:48:06 -08:00
bjorn
bec98004ff
Fix vertical text align;
...
Off-by-one error with counting lines.
2019-01-24 14:07:02 -08:00
bjorn
c473bf50e8
Buffers individually keep track of their flush range;
...
Fixes bugs with attached Mesh attributes, where flushing wasn't
happening when it should have.
2019-01-22 12:11:01 -08:00
bjorn
25606738c5
rm Curve:getDegree;
2019-01-21 09:49:07 -08:00
bjorn
eeecd65029
Update Curve error messages;
2019-01-20 20:40:40 -08:00
bjorn
8e0ccbf09a
Curve:split -> Curve:slice;
2019-01-20 20:36:42 -08:00
bjorn
5deae0a103
Rename setWindow back to createWindow;
...
I'm not sure why this was changed. It doesn't make very much sense
because setWindow can't be called multiple times, and it can't be
called with nil/NULL.
2019-01-20 20:06:40 -08:00
bjorn
8f9d24c51f
Replace sprintf with stb version;
2019-01-18 08:55:29 -08:00