Texture and Begin/End Shape to an image?
in
Programming Questions
•
2 years ago
For an AR application I want to display a background image on a live video. I can do it using Blend(...LIGHTEST) except my image needs to be warped to an arbitrary quadrilateral shape first.
I know that it is possible to use texture and Begin/end shape to warp the image onto an arbitrary quadrilateral (given the appropriate vertices) but it seems that this can only be done by writing to the display and not another image. If it could be applied to another image, then I could just blend this warped image to the display.
So in summary, I either need to use Blend to resize something other than a rectangular region or be able to warp using texture to an image not the display.
As a last resort, I guess I could manually warp and blend the individual pixels to the display - but was wanting to avoid that.
Is my question clear - or should I provide some source code examples?
Any ideas?
I know that it is possible to use texture and Begin/end shape to warp the image onto an arbitrary quadrilateral (given the appropriate vertices) but it seems that this can only be done by writing to the display and not another image. If it could be applied to another image, then I could just blend this warped image to the display.
So in summary, I either need to use Blend to resize something other than a rectangular region or be able to warp using texture to an image not the display.
As a last resort, I guess I could manually warp and blend the individual pixels to the display - but was wanting to avoid that.
Is my question clear - or should I provide some source code examples?
Any ideas?
1