Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement #1992 #1994

Merged
merged 5 commits into from
Dec 13, 2023
Merged

Conversation

nikeinikei
Copy link
Contributor

The settings table for Texture and GraphicsBuffer can now include a new field debugname,
If given, it will appear in a graphics debugger such as RenderDoc, if supported.
it can also be queried via texture:getDebugName() or buffer:getDebugName(), which either returns a string if a debug name was given during initialization, or nil otherwise.

Example:

local texture = love.graphics.newCanvas(64, 64, { debugname = "shadowpass" })
print(texture:getDebugName())    --prints "shadowpass"

local format = {
    { name = 'position', format = 'floatvec2' },
    { name = 'velocity', format = 'floatvec2' },
    { name = 'color', format = 'floatvec4' }
}
local count = 1000000

local buffer = love.graphics.newBuffer(format, count, { shaderstorage = true, debugname = "particles" })
print(buffer:getDebugName())    --prints "particles"

add debugname to settings table for texture and buffer,
which can be used for debugging in e.g. RenderDoc.
@slime73 slime73 merged commit 9b79d3a into love2d:12.0-development Dec 13, 2023
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants