Sorry if this has been asked before, but does Love support (or will it) any sort of compositing?
The basic problem is this: take an arbitrary polygon and then fill it with a tiled image. Use the boundaries of the polygon to clip parts of the tiles that extend beyond.
The solution wouldn't have to be a full system like Cairo's compositing; a simple secondary screen buffer would suffice. Then you could paint alpha over the extra tile portions with a triangle to get the correctly painted polygon. Then it's just a matter of copying the secondary buffer into the primary screen buffer.
Any ideas for solving this problem with existing Love functions are also welcome.
Compositing?
Forum rules
Before you make a thread asking for help, read this.
Before you make a thread asking for help, read this.
Re: Compositing?
Well, no in LOVE 0.5.0 and yes, i think, in 0.6.0. The problem is that the potato (0.6.0 documentation) is still incomplete.
Re: Compositing?
Well I don't know about potatoes, but the wiki did answer my question; 0.6.0 will indeed have two possible solutions:
Framebuffers:
Pixel manipulation:
Framebuffers:
Code: Select all
fb = love.graphics.newFrameBuffer( width, height )
love.graphics.setFrameBuffer( fb )
love.graphics.draw( image, x, y ) -- draws into fb.
love.graphics.setFrameBuffer() -- Change back to screen.
love.graphics.draw( fb, 0, 0, 0, 2, 2) -- Draw the framebuffer to the screen (scaled).
Code: Select all
- Create new image data from file. Let's say
-- ball.png is 128x128.
ball = love.image.newImageData("ball.png")
r, g, b, a = ball:getPixel(0, 0)
ball:setPixel(0, 0, 255, 0, 0, 255)
Re: Compositing?
No, 0.6.0 will not have that. But it is coming.
Who is online
Users browsing this forum: Ahrefs [Bot], Bing [Bot], Google [Bot] and 11 guests