-- Love2d Mesh -- init function love.load() -- get window width and height wdw_w, wdw_h = love.graphics.getDimensions() img = love.graphics.newImage("uvcheckermap01-512.png") bx, by = wdw_w / 2, wdw_h / 2 vertices = { { -- top left -- x, y, u, v, r, g, b, a bx - 50, by - 200, 0, 0, 1, 1, 1, 1 }, { -- top right -- x, y, u, v, r, g, b, a bx + 50, by -200, 1, 0, 1, 1, 1, 1 }, { -- bottom left -- x, y, u, v, r, g, b, a bx - 300, by + 200, 0, 1, 1, 1, 1, 1 }, { -- bottom right -- x, y, u, v, r, g, b, a bx + 300, by + 200, 1, 1, 1, 1, 1, 1 }, } mesh = love.graphics.newMesh(vertices, "strip") mesh:setTexture(img) end -- update function love.update(dt) end -- draw function love.draw() -- fill BG color love.graphics.setColor(0, 0, 0) love.graphics.rectangle("fill", 0, 0, wdw_w, wdw_h) -- draw mesh love.graphics.setColor(1, 1, 1) love.graphics.draw(mesh, 0, 0) -- print FPS love.graphics.setColor(1, 1, 1) love.graphics.print("FPS: "..tostring(love.timer.getFPS()), 10, 10) end function love.keypressed(key, isrepeat) -- ESC to exit if key == "escape" then love.event.quit() end end