GLBasic User Manual

Main sections


LOADSPRITE bmp$, num%

Loads the graphic file (bmp or png) into memory for using it with DRAWSPRITE commands later on. Every loaded sprite needs a unique ID number (num%) which allows you to access the sprite. If an ID is reused, the image in memory for that ID will be replaced by the new image.

The command supports .bmp, -png and .jpg file types.

LOADSPRITE "Sprite.bmp", 0
PRINT "Hello World", 100, 100
DRAWSPRITE 0, 100, 100

See also...