Sasha Szpakowski
af840bb2cf
metal: texel buffers align their size according to device requirements
2024-01-01 16:12:24 -04:00
Sasha Szpakowski
0523aa6f8f
metal: check for depth compare mode support before setting it on a texture.
2024-01-01 15:41:31 -04:00
Sasha Szpakowski
9b537ede2b
Fix out of bounds memory access in Buffer:setArrayData with matrices.
...
Issue #1986
2023-12-31 16:32:12 -04:00
Sasha Szpakowski
dbcdbc47d5
Add debugname field to shader options table.
2023-12-29 16:51:24 +01:00
Sasha Szpakowski
8872497561
graphics: handle default textures in high level code.
...
Previously each backend had to set up default textures with its own code, which needs some care for it to be robust.
2023-12-27 21:28:02 +01:00
Sasha Szpakowski
e42019c59e
Add buffer stats to love.graphics.getStats.
...
- Add 'buffers' field, to count the total number of graphics buffer objects.
- Add 'buffermemory' field, to estimate the total number of bytes of graphics memory used by all buffers.
2023-12-25 23:25:46 +01:00
Sasha Szpakowski
9c6417776f
metal: remove unneeded TODO
2023-12-25 23:24:07 +01:00
Ralty
1f8e3551aa
Update wrap_Graphics.lua
2023-12-24 17:28:27 +07:00
Ralty
b7362200c8
Fix deprecated love.graphics.stencil resetting stencilMode
2023-12-24 17:26:58 +07:00
Sasha Szpakowski
eb552dfcb6
Fix compile warning
2023-12-23 16:54:00 +01:00
Sasha Szpakowski
059cab0364
metal: implement buffer/texture debug names.
2023-12-13 20:27:58 -04:00
Sasha Szpakowski
7b899fbc17
opengl: add version checks when setting debug names.
2023-12-13 20:27:31 -04:00
niki
c8da517759
don't use optional for debugName
2023-12-14 00:42:19 +01:00
niki
364b5c3b7b
adjust code styling
2023-12-14 00:16:38 +01:00
niki
7a25dfa7fc
add texture:getDebugName and buffer:getDebugName
2023-12-14 00:09:08 +01:00
niki
834398335d
fix buffer debugname is optional
2023-12-13 16:03:22 +01:00
niki
a5d7ba1589
implement #1992
...
add debugname to settings table for texture and buffer,
which can be used for debugging in e.g. RenderDoc.
2023-12-13 14:28:34 +01:00
Sasha Szpakowski
910533edda
Initial code for sending flat-array matrices to storage buffers (untested).
2023-11-24 14:12:47 -04:00
Sasha Szpakowski
20ffe94349
vulkan: fix a consistency issue with texture samplers
2023-11-15 23:15:27 -04:00
Sasha Szpakowski
17362b6844
Restore no-parameter variant of love.graphics.setColorMask.
2023-10-30 18:55:26 -03:00
Sasha Szpakowski
5a0a6a1a27
All constructors for making a TrueType font take an optional settings table.
...
This supersedes the existing optional hinting and dpi scale parameters. The table's fields are:
{
hinting = "normal",
dpiscale = 1, -- nil will default to the current window DPI scale.
}
2023-10-20 20:19:30 -03:00
Sasha Szpakowski
8c13943f64
ImageData can track whether they're meant to be loaded into a Texture with a non-sRGB format when gamma correct rendering is enabled.
...
Fixes #1556 .
* Add ImageData/CompressedImageData:setLinear and ImageData/CompressedImageData:isLinear.
The flag is used as a hint when loading a texture from the data to determine if the format should not be treated as sRGB-encoded. The 'linear' flag in newImage overrides this.
* love.graphics.readbackTexture automatically sets the linear flag on ImageData it returns when the texture's format is linear.
This allows an ImageData generated via readback to be fed back into a new Texture and the format will match the original Canvas.
* Also clean up some image decoding code.
2023-10-14 20:48:21 -03:00
Sasha Szpakowski
bd55100d56
metal: fix compile error
2023-10-14 15:02:28 -03:00
Sasha Szpakowski
343d192f10
Compressed texture formats have explicit sRGB variants
2023-10-14 15:01:01 -03:00
Sasha Szpakowski
9eec1754e7
opengl: fix clearing the depth buffer.
2023-10-14 10:30:51 -03:00
Sasha Szpakowski
983ea6c0e6
Remove explicit support for systems that don't support rgba8 canvases.
...
This is just a very small number of really old OpenGL ES 2 drivers.
2023-10-13 21:53:45 -03:00
Sasha Szpakowski
3865868358
Fix creating a linear rgba8 canvas when gamma correct rendering is on.
...
Fixes #1973
2023-10-13 21:41:32 -03:00
Sasha Szpakowski
86eb6df05c
vulkan: don't hold onto ImageData references after loading an image.
...
Reduces CPU memory usage.
2023-10-09 20:22:04 -03:00
Sasha Szpakowski
90cd0be392
Merge pull request #1980 from nikeinikei/12.0-development
...
vk: correctly identify boolean uniforms
2023-10-09 16:17:16 -03:00
niki
88f6bb880e
remove debug code
2023-10-09 20:16:01 +02:00
Sasha Szpakowski
5dc7b7d05b
remove some redundant OpenGL API calls when clearing Canvases
2023-10-09 15:13:47 -03:00
Sasha Szpakowski
8958d155ab
opengl: Fix blue component of love.graphics.setColorMask
2023-10-09 15:13:03 -03:00
niki
2749209fc7
vulkan: fix crash when using wrong uniform name
2023-10-09 20:12:13 +02:00
niki
88272c6855
vulkan: correctly identify boolean uniforms
2023-10-09 20:07:32 +02:00
Sasha Szpakowski
4787d50078
opengl: fix color mask
2023-10-09 14:10:24 -03:00
Sasha Szpakowski
06569b4fed
Merge pull request #1979 from nikeinikei/12.0-development
...
vk: fix crash caused by love.window.close()
2023-10-09 13:37:30 -03:00
Sasha Szpakowski
cf26e39d1b
vulkan: potential fix for compressed textures with mipmaps
2023-10-09 13:13:37 -03:00
niki
21182d1428
vulkan: fix memory leak
2023-10-09 16:04:25 +02:00
niki
51d5b48515
vulkan: fix incorrect device extension
2023-10-09 15:32:17 +02:00
niki
8f8afe3de5
vulkan: fix crash when using love.window.close()
2023-10-09 15:31:23 +02:00
Sasha Szpakowski
2789e5eabf
opengl: fix clearing integer format Canvases.
2023-10-08 21:36:10 -03:00
Sasha Szpakowski
b8cbb62bc3
opengl: scissor and color mask no longer affects love.graphics.clear.
...
This makes it more consistent with other backends.
2023-10-08 21:08:59 -03:00
Sasha Szpakowski
dbc7d7f3ca
Add love.graphics.newMesh variant to create a Mesh from existing Buffers.
...
This allows a Mesh to be created that doesn't have its own internal vertex buffer and purely references other vertex buffers instead.
The prototype looks like this:
mesh = love.graphics.newMesh(attributelist, drawmode)
where attributelist is an array of tables each with the following fields, similar to Mesh:attachAttribute:
{
buffer = vertexbuffer,
name = "VertexPosition", -- the name this vertex attribute will use in a shader
nameinbuffer = nil, -- the name of the attribute in the vertex buffer. Defaults to the name field.
step = nil, -- vertex attribute step ("pervertex" or "perinstance"), defaults to "pervertex".
startindex = nil, -- 1-based array index within the given vertex buffer where the attribute data will start being pulled from during rendering. Defaults to 1.
}
2023-09-30 20:12:43 -03:00
Sasha Szpakowski
691d910c3e
Improve error message when Mesh:setVertexMap is used with an empty array.
2023-09-30 17:54:09 -03:00
Sasha Szpakowski
96040b2b2a
Fix list of data types in the error message when using an invalid vertex data type in the deprecated type+component count vertex format declaration.
2023-09-09 13:22:45 -03:00
niki
61cafd7dd4
adjust code styling
2023-08-01 14:23:10 +02:00
niki
8096cab5bc
vulkan: use vkResetDescriptorPool
2023-07-30 15:35:20 +02:00
niki
9d9e2da763
vulkan: optimize vkUpdateDescriptorSets calls
2023-07-25 21:39:28 +02:00
niki
af717c8cab
vulkan: fix incorrect return type
2023-07-25 16:50:39 +02:00
niki
f30bf9bee0
vulkan: better api use of descriptor pools
...
Some implementations allow for bottomless pools,
which never run out of pool memory.
This new implementation allows for this case to happen.
2023-07-25 16:37:53 +02:00