I am sleepy and I must be missing something, but this problem puzzles me.
I have three images that are masks. First is a circle, second a triangle and third a star.
I also have five other images that are different textures. Wood, sand, silver, gold and snow.
I want to be able to draw the texture images by using the mask images for mask definition. For example draw a silver star or snow triangle.
In the old days this was easy to achieve with classical blitting operators AND and OR. You first blitted the mask with AND operation, which resulted in a black area the shape of the mask drawn on the background. Then you blitted the texture image with OR operation, which resulted in the texture image being draw on the background just on the black area created by the AND operation.
How do I achieve the same result with standard BlitzMax functionality, without doing it by creating pixmaps of all the possible combinations "by hand"?
I want to avoid using pixmaps because of memory and speed issues: in reality I have a great number of different masks and textures.
-AF
I have three images that are masks. First is a circle, second a triangle and third a star.
I also have five other images that are different textures. Wood, sand, silver, gold and snow.
I want to be able to draw the texture images by using the mask images for mask definition. For example draw a silver star or snow triangle.
In the old days this was easy to achieve with classical blitting operators AND and OR. You first blitted the mask with AND operation, which resulted in a black area the shape of the mask drawn on the background. Then you blitted the texture image with OR operation, which resulted in the texture image being draw on the background just on the black area created by the AND operation.
How do I achieve the same result with standard BlitzMax functionality, without doing it by creating pixmaps of all the possible combinations "by hand"?
I want to avoid using pixmaps because of memory and speed issues: in reality I have a great number of different masks and textures.
-AF