Image Manipulation

I’m developing a 2d image manipulation application. I need to be able to “cut-out” polygon shaped sections of a background image and then move/rotate then ontop of that image.
How would I go about doing this?
Is there any way to create an image from the intersection of a larger image and a polygon?

Hi !

You can use glReadPixels to get a reactangular area and use a point in polygon test (google) to find out all pixels that are inside the polygon, not sure if that’s what you are looking for… and it’s not very fast.

You can then put the image on a polygon as a texture.


[This message has been edited by mikael_aronsson (edited 05-06-2002).]