The cheap and cheerful solution is just to draw to an image in the normal way, save it and load it as a masked texture. The more involved method is to use readpixel and writepixel so you can in effect do what the loadtexture routine does when it processes a masked texture. Set the high alpha byte to 0 for those pixels you want masked or 255 otherwise and write this alpha and color information to your texture. That leaves your mip-mapping problem. Cleartexturefilters should work and as for created textures I would have thought the problem would more likely be that there is no mip-mapping, not the other way around as I think you have to explicitly apply the mipmapping flag on created texures. Having said that trying to combine masking with mipmapping could be problematic. So the question has to be what leads you to think it does not work.