Compositing?
Posted: Mon Nov 23, 2009 2:43 am
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.
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.