Masked Sprites

Archives Forums/Blitz3D SDK Programming/Masked Sprites

Derek(Posted 2007) [#1]
How do I get a created sprite() with a texture applied to it to have some transparent sections?

When I say created I mean that I don't want to have to load a sprite but want to create it on the fly.

All I seem to get is the black pixels being drawn along with all the other colours.


impixi(Posted 2007) [#2]
Not sure exactly what you're trying to achieve but you may need to make use of temporary files:

* Create a texture (including transparency)
* Save the texture to a png file
* Load the texture
* Apply it to your Sprite
* Delete the png file

Example in BlitzMax:




Derek(Posted 2007) [#3]
Thanks for the advice.