Status of Masking?
Monkey Forums/Monkey Programming/Status of Masking?
| ||
What is the status of bitmap masks? I want an effect to occur in certain places that are masked off, eg. replacing parts in bitmaps that are a certain color. Is the simplest way to do this simply to use transparent color in a PNG and be done with it? I can certainly do that. But it would be nice to be able to do other sorts of effect similar to those possible using masks in Blitzmax. |
| ||
It also seems not that hard to implement: http://stackoverflow.com/questions/5097145/opengl-mask-with-multiple-textures |
| ||
Am I wrong that this is sort of important to have? Presumably it has been considered and judged less important than other things. What do? Shinkiro, do you think this is something that the community could produce? What would need to be done? |
| ||
Having Porter-Duff compositing and chroma-keying would be useful but there are normally other ways to achieve the same effect. Creating an API to do it that will be consistent in behaviour across targets isn't simple. |
| ||
Can't you use the GL module(s) to produce masking? |
| ||
nDrawExts has access to the stencil buffer, which you can use for masking: http://www.monkeycoder.co.nz/Community/posts.php?topic=4749 All operations are treated as a 1-bit threshold. The buffer's availability seems to depend on the target implementation, since Mojo doesn't set stencil bits. |
| ||
That's awesome. |