Sasha Szpakowski
5c63a945b8
Fix typo
2025-01-26 16:54:03 -04:00
Sasha Szpakowski
92e79ab609
vulkan: reduce memory usage when many shaders are being used with many draw calls.
...
Descriptor pools are now shared among shaders that have the same descriptor counts, instead of being unique per shader.
2025-01-26 14:45:51 -04:00
Sasha Szpakowski
32bd2bdaad
opengl: fix color masks not using proper GLboolean values
2025-01-25 23:09:56 -04:00
Sasha Szpakowski
3412a4defc
Improve format fallbacks when using setCanvas with automatic depth/stencil.
2025-01-25 13:25:20 -04:00
Sasha Szpakowski
dd3ebae7a1
vulkan: don't try to enable anisotropic filtering if anisotropy is 1.
2025-01-25 12:50:57 -04:00
Sasha Szpakowski
324b0f831b
vulkan: improve error messages
2025-01-25 12:11:58 -04:00
Sasha Szpakowski
38168d4857
Handle internal SDL_EVENT_FINGER_CANCELED events.
2025-01-24 22:27:34 -04:00
Sasha Szpakowski
5b4ced266d
Avoid luaL_checkint and luaL_optint, they're not available in Lua 5.4.
...
Fixes #2102 .
2025-01-18 20:37:53 -04:00
Sasha Szpakowski
4e8291fd7e
love.system.openURL implementation uses SDL_OpenURL.
2025-01-18 18:19:05 -04:00
Miku AuahDark
bff50070c6
Android: Support content:// URI in love.filesystem.mountFullPath.
2025-01-16 17:06:03 +08:00
Miku AuahDark
cb27e30879
Android: Cleanup and remove usage of love:// custom protocol.
...
Let SDL3 handle content:// URI support instead.
2025-01-16 17:04:27 +08:00
Miku AuahDark
be21958ab3
Don't canonicalize paths fom SDL file dialog callbacks.
...
If love.filesystem.openNativeFile can't open them, then it's SDL issue, not LOVE.
This is also needed because Android returns content:// URIs instead of regular paths.
2025-01-16 16:54:23 +08:00
Miku AuahDark
cd0302e23d
boot.lua: Don't canonicalize content:// URI.
2025-01-16 16:53:38 +08:00
Sasha Szpakowski
1aa426c307
Merge pull request #2139 from OctoNezd/fix-ios-crash
...
Fix crash on iOS
2025-01-15 22:51:13 -04:00
Yan
cad913bdfb
Fix crash on iOS
2025-01-15 17:35:58 +03:00
Sasha Szpakowski
176a3c17d5
Merge pull request #2133 from MikuAuahDark/nativefile-sdl
...
Replace NativeFile to use SDL IO functions.
2025-01-13 20:59:37 -04:00
Sasha Szpakowski
5ac9b2f1c4
Add codename
2025-01-13 20:30:43 -04:00
Sasha Szpakowski
add3fe3418
vulkan: only debug print that initialization failed if graphics debug mode is enabled.
2025-01-11 14:55:46 -04:00
Sasha Szpakowski
652b012b02
vulkan: improve module initialization code to exit to other backends if there's a device but it's not suitable for love.
...
Disallow software rendering (CPU devices) with vulkan by default. The environment variable LOVE_GRAPHICS_VULKAN_ALLOW_SOFTWARE can be set to 1 to override that behaviour.
2025-01-11 14:55:23 -04:00
Miku AuahDark
0589245387
NativeFile: Make sure default buffer size at least 4096 bytes.
2025-01-10 14:23:33 +08:00
Miku AuahDark
1789855647
NativeFile: Implement better buffered write routines.
2025-01-10 14:18:51 +08:00
Sasha Szpakowski
21c9c06d26
Fix vsync-off in conf.lua when vulkan is used
2025-01-07 20:28:28 -04:00
Miku AuahDark
e95c3a2816
NativeFile: Temporarily open the file for reading to determine file size.
2025-01-05 12:15:23 +08:00
Miku AuahDark
88fb547a58
NativeFile: Implement buffering.
2025-01-05 12:00:23 +08:00
Miku AuahDark
1a61f631e4
NativeFile: Do not check if SDL_GetError() is empty string.
2025-01-05 12:00:23 +08:00
Miku AuahDark
8beb7f0e4b
Do not include SDL_iostream.h in NativeFile.h.
2025-01-05 12:00:23 +08:00
Miku AuahDark
89f75f51fb
Handle aliased target in love_group_projects CMake function.
2025-01-05 12:00:23 +08:00
Miku AuahDark
4029df5a13
Replace NativeFile to use SDL IO functions.
...
Also remove Android-specific code from it as SDL is now able to handle them.
2025-01-05 12:00:23 +08:00
Sasha Szpakowski
f0a7a19ebc
vulkan: fix crash on quit if no window has been created.
2025-01-04 16:19:30 -04:00
Sasha Szpakowski
8e98711096
small filesystem code cleanup
2025-01-04 15:52:52 -04:00
Sasha Szpakowski
e40485dd12
No longer expose a distinct subtype for native files.
2025-01-04 15:50:52 -04:00
Miku AuahDark
3963265939
CMake: Remove SDL2->SDL3 transition leftovers.
...
Fixes #2132 .
2025-01-02 13:52:03 +08:00
Sasha Szpakowski
44e26a12cd
Fix build
2024-12-29 23:42:59 -04:00
Sasha Szpakowski
ecd08a2b0f
Add love.window.showFileDialog(type, callback [, settings]).
...
Resolves #990 .
The type parameter is an enum: "openfile", "openfolder", or "savefile".
The callback parameter takes 3 args:
files (array of full platform-dependent paths to selected files, empty if the dialog is canceled by the user),
filtername (nil if none is set, see below),
errorstring (nil if no error).
The optional settings parameter of showFileDialog has the following fields:
{
title = string (optional title),
acceptlabel = string (optional custom name for the Accept button),
cancellabel = string (optional custom name for the Cancel button),
defaultname = string (optional default folder/file name for the file text box),
filters = table (filter names as keys and filter pattern strings as values).
}
2024-12-29 23:30:32 -04:00
Sasha Szpakowski
aef47df40c
Add love.filesystem.openNativeFile (name may change in the future)
2024-12-29 16:43:49 -04:00
Sasha Szpakowski
fe23e1920b
Fix some compile warnings
2024-12-29 14:09:13 -04:00
Sasha Szpakowski
8443928fe7
Merge pull request #2126 from steveRoll-git/main
...
Improve `"justify"` text alignment
2024-12-25 17:50:53 -04:00
Sasha Szpakowski
7076688a65
Add variant of newCursor which takes an array, for different DPI scales.
...
Resolves #1708 .
2024-12-25 17:45:39 -04:00
Sasha Szpakowski
3d9d162dd6
Add new drop events, add drop position to file/directorydropped.
...
Add love.dropbegan(), love.dropmoved(x, y), and love.dropcompleted(x, y).
Resolves #1346 .
Resolves #2019 .
2024-12-25 14:22:36 -04:00
Sasha Szpakowski
639580cbd1
Add opt-in support for trackpad touch events. Add touch device types.
...
- Add new touch device type enum ("touchscreen", "touchpad", "touchpadrelative"). Coordinates for touchscreens are window-relative DPI-scaled pixels, and coordinates for touchpads are normalized [0, 1] values.
- Add new devicetype enum and ismouse boolean params to touch callbacks.
- Add love.touch.getDeviceType(touchid), love.touch.isMouse(touchid), and optional device type filter param for love.touch.getTouches.
- Add t.trackpadtouch boolean (defaults to false) to love.conf. Trackpad touch events will not be generated unless it's enabled.
Currently the trackpadtouch setting only works on macOS.
Resolves #1633 .
Resolves #2093 .
2024-12-25 13:15:17 -04:00
Sasha Szpakowski
aa93494f54
draw validation: clarify that a type mismatch involves MainTex
2024-12-24 18:50:11 -04:00
Sasha Szpakowski
25631ebe34
Improve execution flow when there's an error in the error handler
2024-12-24 17:13:12 -04:00
Sasha Szpakowski
3a6a36e21c
Improve error message when a shader storage buffer format can't be parsed.
2024-12-23 16:46:42 -04:00
Sasha Szpakowski
3aac7da370
Improve handling of bools in shader storage buffer declarations.
2024-12-23 16:46:17 -04:00
Sasha Szpakowski
a7be648368
fix copy/paste errors in Shader:getBufferFormat
2024-12-23 16:45:40 -04:00
Sasha Szpakowski
a9470bb7f1
Add shared iOS/macOS xcframeworks folder to gitignore
2024-12-22 19:37:02 -04:00
Sasha Szpakowski
aa79ed1ad1
Fix typo
2024-12-20 23:45:31 -04:00
Sasha Szpakowski
b87aed937c
vulkan: clean up framebuffers when textures they reference are deleted
...
Fixes corruption/crashing in some situations if a new texture's image view has the same pointer as a previously deleted texture's image view.
2024-12-20 23:37:06 -04:00
Sasha Szpakowski
1c0491c5c3
metal: hook up t.graphics.lowpower.
...
Resolves #2127 .
2024-12-20 21:06:27 -04:00
Sasha Szpakowski
da365e2ab9
Add t.graphics.lowpower = true/false love.conf option (defaults to false).
...
Add love.graphics.isLowPowerPreferred.
It's currently hooked up in the vulkan backend.
#2127
2024-12-20 21:02:20 -04:00