CreateSprite()

Syntax

Result = CreateSprite(#Sprite, Width, Height [, Mode])
Description
Creates an empty sprite with given dimensions. If #PB_Any is used as '#Sprite' parameter, the new sprite number will be returned as 'Result'.

The 'Mode' parameter is optional and can take the following values:
  0                 : Default mode. Sprite resides in video memory (if possible)
  #PB_Sprite_Memory : Sprite is loaded into main PC memory (for SpecialFX)
  #PB_Sprite_Alpha  : Sprite is 8 bits grayscale and will be used by DisplayAlphaSprite() or DisplayShadowSprite()
  #PB_Sprite_Texture: Sprite is created with 3D support - useful for the CreateSprite3D() function of the Sprite3D library.
  #PB_Sprite_AlphaBlending: Sprite is created with per pixel alpha-channel support, the image format has to support it (only 
                            PNG and TIFF for now). The #PB_Sprite_Texture needs to be specified as well, and the sprite 
                            has to be displayed with DisplaySprite3D().

Supported OS

All

<- CopySprite() - Sprite Index - DisplayAlphaSprite() ->