Commit Graph

4816 Commits

Author SHA1 Message Date
niki 3b9476b5dd vulkan: fix validation warnings
Sometimes no buffer for tex coords are given, however the shader
still expects some. We can fix this by using a default buffer, which
contains the constant tex coords (0, 0), which is then bound instead.
2023-07-18 14:56:42 +02:00
niki ba15a2ab05 vulkan: correct usage of pNext chain for device
For systems where VK_EXT_extended_dynamic_state is not supported
it is not valid to extend VkDeviceCreateInfo with an unknown struct.
Todo: if more extensions are supported in the future this code probably
needs adjustments to correctly build a pNext chain.
2023-07-18 14:01:05 +02:00
niki 04de1ade9e vulkan: correctly deal with custom input attribs 2023-07-18 13:54:48 +02:00
niki 5254417c63 vulkan: remove unnecessary vkDeviceWaitIdle
Since we are only cleaning up objects that haven't been used in the
last 5000 frames, we do not need to wait to delete them.
2023-07-18 13:54:27 +02:00
niki 332b456131 vulkan: remove getDefaultTexture 2023-07-18 13:54:06 +02:00
niki 8b419522d7 vulkan: simplify code slightly 2023-07-18 13:53:25 +02:00
niki 37013267f7 vulkan: improve readability / maintainability 2023-07-18 13:52:26 +02:00
niki 284a385062 support more swapchain image formats 2023-07-18 13:52:13 +02:00
Miku AuahDark d28b30736f Improve MP3 detection slightly more.
Looking too much result in increase of false-positive and vice-versa. So only look first 128 bytes of the file (after the ID3 tags). Also reject known audio file signature such as WAV, Ogg (Theora/Vorbis), and FLAC.

Fixes #1939
2023-06-06 14:36:35 +08:00
Sasha Szpakowski 8efcf27a6e Fix RTL text when fallback fonts are used.
Fixes #1937.
2023-06-03 18:08:22 -03:00
Sasha Szpakowski 48326a026d Fix t.window.displayindex in love.conf.
Fixes #1934
2023-05-28 15:14:45 -03:00
Sasha Szpakowski 545db4b0b3 Merge pull request #1927 from EngineerSmith/bug-hunting
Fixed issue #1925
2023-05-09 15:05:29 -03:00
Sasha Szpakowski 4fef549363 Merge pull request #1926 from EngineerSmith/enet-data
Added variants for peer:send and host:broadcast which accepts light userdata and size
2023-05-09 14:26:58 -03:00
EngineerSmith 4e6aadc033 Fixed issue #1925 misspelling for both keyboard and scancode enums 2023-05-09 18:18:17 +01:00
EngineerSmith 8f5ca512b8 added variant for enet peer_send and host_broadcast to take light userdata and a size than just a lua string 2023-05-09 17:46:02 +01:00
Sasha Szpakowski 90b22f7d42 Fix love.graphics.draw(TextBatch) accessing an invalid pointer.
Fixes #1922.
Fixes #1914.
2023-04-22 21:59:15 -03:00
Sasha Szpakowski 7613067f21 Merge branch 'main' into 12.0-development 2023-04-13 22:36:29 -03:00
Sasha Szpakowski fe886c3c51 Updated changelog 2023-04-13 22:32:54 -03:00
scurest f5b8117c19 graphics: fix typo in comment 2023-04-13 22:12:28 -03:00
scurest 106daedf75 graphics: fix for anti-parallel line segments (#1894)
Handle the case when a line doubles back on itself, eg

  love.graphics.setLineJoin("bevel")
  love.graphics.line({
    180, 400,
    200, 400,
    100, 400
  })
2023-04-13 22:12:22 -03:00
Sasha Szpakowski a71cfdcb50 Fix typo 2023-04-13 22:12:11 -03:00
Sasha Szpakowski 1080507c7d Improve variable name readability in line rendering code. 2023-04-13 22:12:05 -03:00
slime c245397178 Remove NaN-check C assert calls in line drawing code.
Users can pass NaN point values into line drawing code. love shouldn't abort the entire program if that happens.
2023-04-13 22:11:46 -03:00
Klonan 7e0f8ca791 FIx polyline adding NaN normals, which breaks the line rendering 2023-04-13 22:11:35 -03:00
slime f6e9277a6d macOS: fix colors appearing oversaturated on P3 displays.
The fix only applies to macOS 11+ when using OpenGL.
2023-04-13 22:03:23 -03:00
Sasha Szpakowski 2b01179b35 Merge branch 'main' into 12.0-development 2023-04-13 21:56:19 -03:00
Sasha Szpakowski 02427c3ddc metal: fix a crash on quit 2023-04-02 17:09:44 -03:00
Sasha Szpakowski 2c3ea60c79 Add love.window.focus (resolves #1911).
Calling the function brings the window into the foreground and makes it the focused window for keyboard input.
2023-04-01 18:02:16 -03:00
Sasha Szpakowski 0b48dacb4e Remove convenience constructor functions for vertex and index buffers.
love.graphics.newVertexBuffer and newIndexBuffer don't do enough to justify their existence since love.graphics.newBuffer already covers all buffer creation functionality.

1-based indices in newIndexBuffer versus 0-based indices in newBuffer(..., {index=true}) was also confusing.
2023-03-26 20:46:24 -03:00
Sasha Szpakowski 059d60b404 love.wheelmoved: add preciseX, preciseY, and direction enum parameters.
Fixes #1910.
2023-03-19 11:04:49 -03:00
Sasha Szpakowski c4aaab6bf0 Remove love.dropbegan and love.dropcompleted callbacks. Closes #1908
They don't do what most people might assume they do (they happen at the same time as the user completes a drag-and-drop operation and they surround the dropfile events, instead of starting when the user initiates the operation). Also their functionality can be replicated without needing dedicated love event callbacks.
2023-03-04 16:51:42 -04:00
Sasha Szpakowski 4e86d45ffd Merge pull request #1906 from scurest/fix-1894
graphics: fix for anti-parallel line segments
2023-02-26 13:14:44 -04:00
scurest ee90667846 graphics: fix typo in comment 2023-02-21 22:18:28 -06:00
scurest bdcef0bbc8 graphics: fix for anti-parallel line segments (#1894)
Handle the case when a line doubles back on itself, eg

  love.graphics.setLineJoin("bevel")
  love.graphics.line({
    180, 400,
    200, 400,
    100, 400
  })
2023-02-21 22:18:28 -06:00
Sasha Szpakowski abf9980cc2 Fix ByteData:set* error message. 2023-02-20 10:06:09 -04:00
Sasha Szpakowski bec488519d Add a variant of love.data.pack which takes an existing ByteData object.
#1594
2023-02-19 22:15:07 -04:00
Sasha Szpakowski 1909e80409 Add ByteData:setString. 2023-02-19 20:26:35 -04:00
Sasha Szpakowski 78de7bdf3c Move ByteData float/int getter methods to Data. 2023-02-19 19:52:07 -04:00
Sasha Szpakowski 416abdbc59 love.graphics.copyBuffer: slightly more robust error handling. 2023-02-19 19:36:32 -04:00
Sasha Szpakowski c70b0a0b03 Add Buffer:clear, to reset all or part of a Buffer's contents to 0. 2023-02-19 19:36:03 -04:00
Sasha Szpakowski 11c92ece33 Merge pull request #1902 from nikeinikei/12.0-development
Improve vk render passes
2023-02-14 21:23:45 -04:00
niki 5eae82ab33 vulkan: fix gammacorrect in Graphics::clear 2023-02-15 01:22:38 +01:00
Sasha Szpakowski 70a18e115f vulkan: don't set CREATE_DEDICATED_MEMORY flag for buffer memory.
It was being set all the time because of a code bug, but also documentation recommends using it very sparingly - partly because systems have a hard limit on the number of individual allocations (and they can also be a lot slower).

We might want to revisit more selective use of the flag in the future.
2023-02-14 20:18:26 -04:00
Sasha Szpakowski 139c68d197 better error checking for Data:getString's size parameter. 2023-02-13 19:41:25 -04:00
Sasha Szpakowski f6416dd584 Add optional byte offset and size parameters to Data:getString. 2023-02-13 19:39:31 -04:00
Sasha Szpakowski 02e8acc0d2 Add ByteData methods for getting/setting number values.
See #1594
2023-02-13 19:37:59 -04:00
niki 4f321d69e7 vulkan: cache depthStencilFormat 2023-02-12 14:52:30 +01:00
niki dc6e080d18 vulkan: code styling 2023-02-12 14:18:26 +01:00
niki 6183f67598 vulkan: fix wrong attachment load op 2023-02-12 00:54:03 +01:00
niki 2fc5a8afe0 vulkan: removed unused optional extension 2023-02-12 00:22:51 +01:00