How to load transparent Image?
Blitz3D Forums/Blitz3D Programming/How to load transparent Image?
| ||
Hi all. Can someone please tell me how I can load an image to the screen, that's transparent? Any help is greatly appreciated! Thank You! :) |
| ||
Iirc b3d cannot handle alpha bitmaps properly except when using textures. It can handle mask colors though. If you want to draw alpha images i reccommend using 3d a fake 2d overlay which is made up of flat 3d objects. This way you can get 2d with an alpha channel. It is also faster to do this as some cards take a real hit when using drawimage over 3d. I think i may have put something in the code archives years ago that does something like this.... Last edited 2012 |
| ||
Can you show me a link to an example of how to do this? Thank You! :) |
| ||
http://www.blitzbasic.com/codearcs/codearcs.php?code=1359 It was written years ago, but you might find it useful to improve on. PS It is calculated to a virtual 640x480 overlay, it should not matter what res you have the video in, the "2D SCREEN" will always have these dimensions. Of course if you want bigger, just play with the numbers. Last edited 2012 |
| ||
Use sprites or quads. I've told you before that blitz can't do 2d alpha. You said to me in the OZ GUI thread you have a way. I also explained the only way is use textured quads or sprites. Create a sprite. Load a texture, with the alpha flag. Apply the texture to the sprite. |
| ||
Not sure what your ultimate goal is but I was always a big fan of SpriteCandy. http://www.x-pressive.com/SpriteCandy/ |
| ||
This is why I keep babbling about that Draw3D system of Hectic's. It's a full drawing engine implemented using positioned mesh quads, so it can do this and many other things the 2D commands can't. |
| ||
Could always use fastimage. |
| ||
Both EXCELLENT ideas. I will try tomorrow! :D Thanks guys! :D |