Commit Graph

4341 Commits

Author SHA1 Message Date
slime bded15ff2a Decoders failing to allocate their buffer will cause a Lua error instead of crashing. 2022-08-25 19:44:10 -03:00
slime db1bf4707c Workaround for built-in shaders on some ES2 devices which don't support highp in pixel shaders. 2022-08-25 19:25:01 -03:00
slime 96820749ad Potential optimization for built-in uniform access in shader code.
Assigning to and accessing extra shader variables can increase VGPR / wave-variant register usage in shaders, which is often a limiting factor for performance in non-trivial shaders. Accessing the uniforms directly should bypass that.
2022-08-25 18:17:31 -03:00
slime73 48b791eb3e Merge pull request #1831 from Er2ch/sdl-2.24.0
SDL 2.24.0 support
2022-08-20 13:55:48 -03:00
Er2 53b20b1341 some fixes
Fixed duration and love naming conventions.
2022-08-20 19:05:56 +03:00
Er2 7c9d6d5694 add Lua string for new controllers 2022-08-20 10:51:39 +03:00
Er2 0b4b1db9fe SDL 2.24.0 support 2022-08-20 10:44:34 +03:00
slime 1afe5a56da Merge branch 'main' into 12.0-development 2022-08-09 20:42:34 -03:00
slime 8495cefd3b opengl: fix creating compressed array textures with > 1 layer.
Fixes #1817.
2022-08-09 20:37:48 -03:00
slime ea3c9ee7e6 Merge branch 'main' into 12.0-development 2022-07-24 16:34:28 -03:00
slime 870021b8bd Potentially fix a crash when calling Text:add("").
#1824
2022-07-24 16:23:56 -03:00
slime a2eaed33eb Update lua-https to latest source. Adds new methods.
The newly supported methods are HEAD, PUT, DELETE, and PATCH.
2022-07-22 22:42:35 -03:00
Alex Szpakowski 6d29384dc8 Merge pull request #1819 from Er2ch/12.0-development
Fix compilation error on old SDL2 library.
2022-07-10 09:53:40 -03:00
Er2 a77acef358 Fix compilation error on old SDL2 library. 2022-07-10 15:26:12 +03:00
Alex Szpakowski 258d2334af OpenGL: Fix missing 'keep' and 'zero' stencil action implementations.
Fixes #1818
2022-07-09 09:00:58 -03:00
Alex Szpakowski d586d18474 Properly use SDL's new Windows dpi scaling hint.
Fixes #1814.
Fixes #1421.
2022-07-03 17:03:58 -03:00
Alex Szpakowski 814aaa95cd Fix compilation on Windows 2022-06-18 18:09:58 -03:00
Alex Szpakowski 69c4a496dd Fix a few minor compiler warnings 2022-06-18 17:59:55 -03:00
Alex Szpakowski 2149457c72 Merge branch 'main' into 12.0-development 2022-06-18 17:52:27 -03:00
Alex Szpakowski 131b53d795 Fix typo in Metal code for shader switching. 2022-06-18 17:15:20 -03:00
Alex Szpakowski 17b359f939 Windows: add support for high-dpi when capable SDL versions are used.
Issue #1421
2022-06-11 19:49:26 -03:00
Alex Szpakowski dd7e20fe18 Xcode project file maintenance 2022-06-09 19:57:53 -03:00
Alex Szpakowski 07f087c139 Fix newFileData and newThread outputting deprecation warnings.
Fixes #1811.
2022-06-09 19:57:31 -03:00
Alex Szpakowski 4a1d01c68c Fix cmake builds 2022-05-30 22:14:02 -03:00
Alex Szpakowski 3a5c3df02f Add sync and async texture and buffer readback APIs.
- Add imagedata = love.graphics.readbackTexture(texture, [slice, mipmap, x, y, w, h, [dest, destx, desty]]).
- Add readback = love.graphics.readbackTextureAsync(texture, [slice, mipmap, x, y, w, h, [dest, destx, desty]]).
- Add bytedata = love.graphics.readbackBuffer(buffer, [offset, size, [dest, destoffset]]).
- Add readback = ove.graphics.readbackBufferAsync(buffer, [offset, size, [dest, destoffset]]).
- Deprecate Texture:newImageData.

The async variants return a new GraphicsReadback object. It has the following methods:
- isComplete()
- hasError()
- wait()
- getBufferData()
- getImageData()
- update() (called automatically every frame by love, not normally needed).

Support notes:
- readbackBuffer and readbackBufferAsync require buffer copying support.
- readbackTexture with a render target (canvas) is always supported. readbackTexture with a non-render-target requires copy-texture-to-buffer support.
- readbackTextureAsync with a render target requires copy-render-target-to-buffer support. readbackTextureAsync with a non-render-target requires copy-texture-to-buffer support.
2022-05-30 21:53:55 -03:00
Alex Szpakowski fb450b1df4 Add internal code for temporary buffers. 2022-05-30 21:46:55 -03:00
Alex Szpakowski a533982cb4 Replace internal 'staging' buffer data type with new 'readback' type. 2022-05-30 21:43:25 -03:00
Miku AuahDark 7b66e50cfc Add support for love.filedropped in Android.
To send file to the filedropped callback, share the files to the game.
Note that for non-fused binary, if there's no game running, LOVE treat it as
*.love game to run.
2022-05-29 01:49:29 +08:00
Miku AuahDark 2879074177 Silence compiler warnings in isModifierActive. 2022-05-28 19:19:50 +08:00
Miku AuahDark 9e1e35ff39 Fixed love.audio.newSource(SoundData) variant. 2022-05-28 19:17:50 +08:00
Miku AuahDark 2822f17a39 Minor improvements and fixes to Android-specific code. 2022-05-28 13:47:53 +08:00
Miku AuahDark aaeb318aa6 Android: Implement special path URI for passing file descriptors.
This is to workaround the limitation of content:// URI severely limited.
2022-05-22 22:40:09 +08:00
Miku AuahDark 2016972607 Android: Reorder fused file preference. 2022-05-22 20:20:39 +08:00
Alex Szpakowski 502adfcb15 Merge pull request #1805 from MikuAuahDark/setadev
Support for Audio Device Selection and Disconnection Callback
2022-05-10 18:22:49 -03:00
Miku AuahDark e79c272140 Update dr_flac to 0.12.38
Fix buzzing audio in some cases when decoding FLAC in Ogg container.
2022-05-07 12:18:24 +08:00
Miku AuahDark 7af537a417 Rename *OutputDevice(s) to *PlaybackDevice(s) 2022-05-07 11:04:28 +08:00
Miku AuahDark b2a6abdc0a Pass all stopped sources on love.audiodisconnected callback.
The behavior of sources re-played during these times is inconsistent.
Streaming sources will desync while static sources stop completely.
2022-05-07 10:50:10 +08:00
Miku AuahDark 2cc93af436 Add love.audiodisconnected callback.
The callback is fired when the audio has been disconnected.
2022-05-03 22:36:13 +08:00
Miku AuahDark 5e0f0dc02e Add love.audio.setOutputDevice 2022-05-03 20:16:26 +08:00
Miku AuahDark 65b898903c Add love.audio.getOutputDevice(s). 2022-05-03 19:29:24 +08:00
Miku AuahDark 5dd7902175 Use DRMP3_FALSE instead of "false" in MP3 seeking. 2022-05-02 09:44:56 +08:00
Miku AuahDark 5c3f8a8950 Fix compile error. 2022-05-02 09:43:08 +08:00
Miku AuahDark c9ab08a2d3 Improve MP3 detection to reduce false positive. 2022-05-02 09:20:04 +08:00
Miku AuahDark c19d7cab1e Reorder sound decoder factory preference. 2022-05-02 07:40:48 +08:00
Miku AuahDark 2620225c03 Revert "Implement audio probing to reduce audio false positive."
This reverts commit 5f386cfa87 and 17800813b9.
2022-05-01 21:51:31 +08:00
Miku AuahDark 17800813b9 Fix iOS compile error. 2022-05-01 17:15:07 +08:00
Miku AuahDark 5f386cfa87 Implement audio probing to reduce audio false positive. 2022-05-01 17:01:50 +08:00
Alex Szpakowski ee336e5393 opengl: restructure code for computing format support. 2022-04-23 13:15:58 -03:00
Alex Szpakowski 28a64c2b29 Use uint32 instead of int for some internal bit-flags. 2022-04-23 09:41:29 -03:00
Alex Szpakowski b2ba63df18 Fix typo in error message 2022-04-23 09:40:02 -03:00