SpriteToBuffer

Top  Previous  Next

Syntax

POINTER = SpriteToBuffer(sprite as POINTER)

Description

Attaches the sprite to the SpriteBuffer

Parameters

sprite - Sprite pointer returned by LOADSPRITE or CREATESPRITE

Return value

For convenience a pointer to the SpriteBuffer variable.

Remarks

The SpriteBuffer buffer is a special pseudo DirectX buffer than can be used to draw on a sprite with any of the 2D or Window drawing functions. This command attaches a sprite to that buffer.

See Also: LOADSPRITE, CREATESPRITE

Example usage

newSprite = CREATESPRITE(100,100,1)
SpriteToBuffer(newSprite)
FILLSCREEN RGB(255,0,0), SpriteBuffer
DrawRect 0,0,100,100,RGB(0,0,255),SpriteBuffer