Text above players' head: transparancy

Blitz3D Forums/Blitz3D Programming/Text above players' head: transparancy

The forum is locked. These are the original blitzbasic.com forums, kept so they can still be read. No new topics, replies or edits can be made here. To join in, head over to the Blitz3D+ forums.

It works this way,
do you need the texture to be masked? because that's the problem, if you use flags 1+2 then there is no problem, this way you don't even need the "do_mask()" function, I think :)

test this:


Graphics3D 640,480 

camera=CreateCamera() 
	CameraClsColor camera,50,50,50

light=CreateLight() 
RotateEntity light,90,0,0 

cube=CreateCube() 
	PositionEntity cube,0,0,3
	EntityFX cube,1+16

;;;;;;;;;;;
texture=CreateTexture(256,256,1+2)

ClsColor 0,0,0
Cls
	For r=1 To 10
	Color Rand(100,255),Rand(100,255),Rand(100,255)
	Rect Rand(10,64),Rand(10,64),Rand(20,100),Rand(20,100),False
	Next

Color 255,255,255
	For t=1 To 20
	Text Rand(10,200),Rand(10,200),"TESTING..."	
	Next
	
CopyRect 0,0,256,256,0,0,BackBuffer(),TextureBuffer(texture)
;;;;;;;;;;;

EntityTexture cube,texture


While Not KeyDown( 1 ) 

  pitch#=0 
  yaw#=0 
  roll#=0 

  If KeyDown( 208 )=True Then pitch#=-1 
  If KeyDown( 200 )=True Then pitch#=1 
  If KeyDown( 203 )=True Then yaw#=-1 
  If KeyDown( 205 )=True Then yaw#=1 
  If KeyDown( 45 )=True Then roll#=-1 
  If KeyDown( 44 )=True Then roll#=1 

  TurnEntity cube,pitch#,yaw#,roll# 

  RenderWorld 
  Flip 

Wend 

End