SprControl:TinyExample.bb
Blitz3D Forums/Blitz3D Programming/SprControl:TinyExample.bb
| ||
Could someone make a version of that tiny_example.bb that comes with Sprite Control library, but that actually demonstrates alpha transparancy which is the purpose of using sprites for 2d graphics? |
| ||
This should work. You need an image with the alpha stored (such as a TGA image). ; Sprite Control - Loading/Displaying Alpha'd images Include "include\Sprite Control.bb" SpriteGraphics3D 640,480 tex=LoadTexture("gfx\alpha test.tga",2) ; <- 2 = ALPHA tw=TextureWidth(tex) : th=TextureHeight(tex) sprite=CreateImage3D(tw,th) EntityTexture sprite,tex DrawImage3D sprite,120,80 RenderWorld Text 05,10,"Sprite Control - Alpha'd image" Flip : WaitKey EndGraphics3D End |