sprite=Text3D(x#,y#,text$[,flags][,parent])

Parameters

x - horizontal screen coordinate (in pixels)
y - vertical screen coordinate (in pixels)
text$ - string to display in sprite

flags (optional):
1: Color *
2: Alpha
4: Masked *
8: Mipmapped
16: Clamp U
32: Clamp V
64: Spherical reflection map
128: <void>
256: Store texture in vram
512: Force the use of high color textures

* Default

parent (optional) - give an alternative entity in which to attach the sprite to
By default the parent is the pivot as created by:
SpriteGraphics3D or CreateSpritePivot()

Description

Creates a sprite from the text string supplied.
The text colour and size are determined by the standard SetFont & Color commands.
It is recommend that you use a fairly large font size along with the BOLD flag.
If no text is supplied a default '?' will be used.
The sprites upper/left corner will be positioned on screen at pixel coordinates x/y just like the 2D Text command.
The optional flags apply different effects to the texture used in the sprite. Default value is 5.
The textures handle is set to the global spritetexture variable.

This is not a fast function. Best used outside of the main program loop.

* NOTE: It is important to initialise the sprite display system first!
See SpriteGraphics3D or CreateSpritePivot()

Alternatively, you might want to attach the sprite to your own pivot/entity.
If so, just pass it's handle to the optional parent parameter.

See Also: FreeImage3D

Example

Include "Sprite Control.bb"

SpriteGraphics3D 640,480

SetFont LoadFont("Tahoma",38,True) ; size 38 and bold

sprite=Text3D(200,140,"Hello World!")

RenderWorld
Flip
WaitKey
End


Index