Linking/merging drawings
Posted: Sun Oct 26, 2014 3:11 pm
Hi guys,
I've just started working with LOVE and I have one small question.
Is it possible to draw multiple objects as one? For example, instead of doing
love.graphics.rectangle( "fill", x1, y1, width1, height1)
love.graphics.rectangle( "fill", x2, y2, width2, height2),
I want to draw both rectangle with just one line of code, by pre-defining them somehow, like
double_rectangle = rectangle1 + rectangle2
draw double_rectangle
I'm asking because I'm working with multiple stacked rectangles of different transparencies and drawing them every frame is very CPU-intensive.
Hope you can help!
I've just started working with LOVE and I have one small question.
Is it possible to draw multiple objects as one? For example, instead of doing
love.graphics.rectangle( "fill", x1, y1, width1, height1)
love.graphics.rectangle( "fill", x2, y2, width2, height2),
I want to draw both rectangle with just one line of code, by pre-defining them somehow, like
double_rectangle = rectangle1 + rectangle2
draw double_rectangle
I'm asking because I'm working with multiple stacked rectangles of different transparencies and drawing them every frame is very CPU-intensive.
Hope you can help!