create multiple lines with one function
Forum rules
Before you make a thread asking for help, read this.
Before you make a thread asking for help, read this.
create multiple lines with one function
I want to create multiple lines from constantly changing X and Y variables. But I can not figure out how to create more than 1 line other than to use more than 1 "love.graphics.line" function.
Re: create multiple lines with one function
1. there is nothing wrong with calling love.graphics.line multiple times.
2. you can give more than two coordinate pairs to love.graphics.line to create a continuous line with more than one segment (see wiki page example)
3. if you draw a lot of lines you can theoreticall create a mesh to draw them, but it's quite complicated since you need to turn every line into at least two triangles and add those vertices to the Mesh.
2. you can give more than two coordinate pairs to love.graphics.line to create a continuous line with more than one segment (see wiki page example)
3. if you draw a lot of lines you can theoreticall create a mesh to draw them, but it's quite complicated since you need to turn every line into at least two triangles and add those vertices to the Mesh.
- Jasoco
- Inner party member
- Posts: 3726
- Joined: Mon Jun 22, 2009 9:35 am
- Location: Pennsylvania, USA
- Contact:
Re: create multiple lines with one function
Löve can draw thousands of objects per frame without getting anywhere close to going lower than 60FPS. You don't need to be afraid to draw a lot of objects.
Who is online
Users browsing this forum: Ahrefs [Bot], Bing [Bot] and 6 guests