Masked Textures

Blitz3D SDK Forums/Blitz3D SDK Programming/Masked Textures

Ok I may be dense but am not seeing what is wrong with this code. I am trying to create a simple masked sprite.

This works with B3d. The sprite is displayed masked on first flip and onsecond flip.

Graphics3D 640,480

cam = CreateCamera()
CameraClsColor cam,0,0,255
MoveEntity cam,0,0,-5

sp = CreateSprite()
texture= LoadTexture("masked.bmp",1+4+16+32)
EntityTexture sp,texture
RotateSprite sp,20

RenderWorld:Flip
WaitKey

RenderWorld:Flip
WaitKey

End


Now with BMAX

This same code the sprite is masked on first flip but mask is lost on second and subsquent renders.

Framework blitz3d.blitz3dsdk

bbBeginBlitz3D()
bbGraphics3D 640,480

cam = bbCreateCamera()
bbCameraClsColor cam,0,0,255
bbMoveEntity cam,0,0,-5

sp = bbCreateSprite()
texture= bbLoadTexture("masked.bmp",1+4+16+32)
bbEntityTexture sp,texture
bbRotateSprite sp,20

bbRenderWorld
bbFlip
bbWaitKey

bbRenderWorld
bbFlip
bbWaitKey



This is driving me nus can someone confirm with a simple masked sprite with B3d and BMAX.


My test was in Delphi, but figured most of you have MAX. Behavorior with SDK is very strange.

Thanks

Doug

I think you are right. With the sdk, the mask is lost on the 2nd render, however with Blitz3d, it doesn't

Thanks b32, I post it as bug. Hopefully we will see update soon.


Doug

I just tried it in C/C++ and it also loses its mask info on 2nd render.

I can't find the original thread for this where I posted a possibly useless workaround of having at least one non masked surface in the renderpipe. Will try and get to the bottom of it this week.