Commit Graph

4031 Commits

Author SHA1 Message Date
bjorn 3ff64fa3ef OpenXR: Fix instance extension enumeration; 2022-01-29 15:31:44 -08:00
bjorn 7ed47e946b Fix problem when requiring audio/graphics/headset in threads;
These modules access the conf table, which isn't available on threads.
2022-01-16 12:13:46 -08:00
bjorn 599bbc5cf4 Fix off by one error in texture limit; 2022-01-10 00:03:01 -08:00
bjorn 07074a39a8 mv os_web os_wasm;
Gotta pick a consistent name.
2022-01-06 22:23:21 +02:00
bjorn 63246d60aa Year; 2022-01-01 02:08:46 +02:00
bjorn 8462beef00 Fix/improve alpha cutoff;
The current flag did not work because float shader flags are not
supported.  It was also not very useful because it was per-shader
and did not use the alpha cutoff property of glTF materials.

Instead, let's turn the shader flag into an enable/disable boolean,
and add a scalar material property named "alphacutoff" that gets
read by the glTF importer.

When the alphaCutoff flag is enabled, the material property will be
compared against the pixel's alpha value to decide whether it should
get discarded.
2021-12-28 21:10:52 +02:00
bjorn 8d3d233e91 Include unknwn.h to fix OpenXR on some windows systems; 2021-12-27 15:16:50 +02:00
bjorn 20e4567bd6 Merge branch 'master' into dev 2021-12-20 17:12:39 +02:00
bjorn 9ff00ae789 tup: use d8 instead of dx; 2021-12-07 18:20:03 +02:00
Nevyn Bengtsson 06dd81f6d7 Use d8 instead of dx
dx was deprecated years ago, and d8 replaces it. dx is
removed in build-tools 31, so it's best not to depend on it.

In addition, d8 now supports Java 11 (class version 55), which
is required to use the javac bundled with Android Studio.
2021-12-07 08:17:56 -08:00
bjorn 255ecbb4d8 Fix stencil color mask;
- When calling lovr.graphics.stencil, the color mask is initially
  disabled, and gets restored to its initial state afterwards.
- However, when it's restored, it uses lovrGraphicsSetColorMask, which
  just sets shadow state that doesn't make it all the way to GL until
  another draw is done.
- The consequence of this is that if you call .stencil and then don't do
  a draw, any clears that happen will use the old (disabled) color mask,
  preventing the color buffer from being cleared.
- The solution here is to lower the color mask change down into opengl.c
  where it can directly hit OpenGL.
2021-11-24 12:25:57 -08:00
bjorn e283245dc6 Remove suspicious friction override; 2021-11-12 12:20:21 -08:00
bjorn 6fb5885e9b Fix glb loading; 2021-11-05 18:47:03 -07:00
bjorn 998b355e30 Make some private functions static; 2021-10-31 12:35:49 -07:00
bjorn ebeee33298 Fix lovrAudioGetSampleRate prototype; 2021-10-31 12:09:33 -07:00
bjorn 743be341f4 tup: prettier clang error colors; 2021-10-31 12:06:03 -07:00
bjorn af6ae0cfbb Fix VrApi casing; 2021-10-28 14:36:31 -07:00
bjorn ce43386a42 Update tup config;
- tup.config can now override Lua config values
- comment some of the config values
2021-10-28 14:35:05 -07:00
bjorn e1527a949a openxr: fix xrLocateViews call;
- The input parameter is a count, not a size
- The view structs must be initialized with a type
2021-10-24 13:03:05 -07:00
Josip Miskovic 8e64ded60a Check stbtt_GetGlyphBox() return status
Only use results of stbtt_GetGlyphBox() if they are valid. Fixes the
font rendering glitch when printing text with leading space character.
2021-10-24 11:21:16 -07:00
Josip Miskovic 09cc73a988 Move text measuring to Rasterizer 2021-10-21 10:42:11 -07:00
bjorn 0a2f968850 Fix circle uvs;
After changing circle scale from diameter to radius, the uvs broke,
since they are calculated from the position.
2021-10-09 03:52:11 -07:00
bjorn fe08dc3769 Fix Mesh:setVertices starting index wraparound crash; 2021-10-09 03:01:40 -07:00
bjorn 61730dd89b ModelData exposes its animations; 2021-10-08 14:25:03 -07:00
bjorn 00e6e20595 Details; 2021-10-08 14:12:44 -07:00
bjorn b3a5a14c2d ModelData exposes its skins;
ew
2021-10-08 14:12:30 -07:00
bjorn 3bfe2ee3d5 ModelData exposes its materials; 2021-10-08 13:58:34 -07:00
bjorn e5efe890f9 ModelData exposes its meshes; 2021-10-08 13:47:08 -07:00
bjorn bfa155a103 ModelBuffer tracks more blob info; 2021-10-08 13:46:42 -07:00
bjorn ff680f7882 ModelData exposes nodes; 2021-10-08 12:49:31 -07:00
bjorn e3fab5e107 ModelData exposes its Blobs and Images; 2021-10-08 11:46:08 -07:00
bjorn 6b99862d3d Don't always force AMD mode to true!; 2021-10-03 15:31:29 -07:00
bjorn 48d98a701c Use WebGL buffer path on AMD GPUs;
AHHHHHHHHHHHHH
2021-10-03 15:31:17 -07:00
bjorn cb56d7713a Update README; 2021-09-26 10:01:53 -07:00
Josip Miskovic 015a2ed69c Accept number values in Vec2/3/4 operations
Vector methods are extended to receive vectors as individual numbers
for each of x,y,z,w component. The vector objects are still supported
as well.

Previously only single value scalar was supported. This change maintains
backward compatibility.

```
v = vec3():add( 1, 2, 3 )          -- both do the same
v = vec3():add( vec3(1, 2, 3) )    _/

v = vec4():mul( 2 )            -- x component is a default for y, z
v = vec4():mul( 2, 2, 2, 2 )   _/

v = vec2():lerp( 2, 2, 0.5 )        -- in lerp, dot, cross, distance
v = vec2():lerp( vec2(2, 2), 0.5 )  _/   all components are mandatory
```
2021-09-07 14:00:59 -07:00
bjorn 04d6996b94 Font:getWidth also returns width of last line; 2021-09-06 16:14:47 -07:00
bjorn 8a1b38237a Indentation; 2021-09-04 11:30:56 -07:00
bjorn 5aa0da0df5 tup: buildtoolsversion -> buildtools; native target instead of nil; 2021-08-19 12:22:14 -07:00
bjorn 1fdaa797ac Error on enabling an effect on a Source with effects disabled; 2021-08-12 11:25:51 -07:00
bjorn a73be7cba0 Fix lovr.headset.getName on Quest 2;
The manifest was not properly marking Quest 2 as a supported device,
so Oculus was pretending to be a Quest 1.
2021-08-12 11:16:18 -07:00
bjorn 8ea24c266c vrapi: Fix recentering; 2021-08-07 09:27:58 -07:00
mcc 25ffcf9dd1 Add new XML attributes required for Oculus submission 2021-08-04 11:15:54 -07:00
bjorn 703104c4d1 Fix pico build; 2021-08-04 11:05:29 -07:00
mcc 9f96917d91 Fix horizontal rotation bug in Oculus spatializer 2021-07-26 11:24:04 -07:00
mcc db28be591a Fix incomplete LOVR_ENABLE PHONON/OCULUS define change 2021-07-23 09:55:16 -07:00
bjorn f552bacb2d tup: fix android project file inclusion; 2021-07-21 03:33:54 -07:00
bjorn 20a7a32c73 tup: c++ dependencies link to libstdc++ statically;
This is probably "bad" but it fixes some android stuff.  And hey,
lovr doesn't link against libc++ at all anymore.
2021-07-21 03:32:56 -07:00
bjorn cd69ffa5da tup: engage supercharge boosters; 2021-07-21 03:32:28 -07:00
bjorn 95d23e8739 Fixup; 2021-07-20 11:31:16 -07:00
mcc 52db969622 Remove DEFAULT_SAMPLE_RATE 2021-07-20 11:28:48 -07:00