lovr-docs
lovr-docs copied to clipboard
2D Text Example
e.g.
function lovr.draw(pass)
local width, height = pass:getDimensions()
pass:setProjection(1, mat4():orthographic(width, height, -1, 1))
pass:setViewPose(1, mat4())
local font = lovr.graphics.getDefaultFont()
font:setPixelDensity(1)
pass:text('hi', width / 2, height / 2, 0, 1)
end
There is Window_HUD but it's not a small snippet like this