sprite=LoadImage3D(file$[,flags][,parent])

Parameters

file$ - filename of image file to be used

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 quad entity from an image file.
The entity is then attached to the sprite pivot (or parent if supplied).
The sprites width and height are set to the pixel size of the image.

The optional flags parameter can be used to apply different effects to the texture. Default value is 4.

* 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

mysprite=LoadImage3D("myimage.bmp")
RenderWorld

Flip
WaitKey
End


Index