GLBasic User Manual

Main sections

USESCREEN

USESCREEN id%



This command sends the output of all following graphical commands to a previously created virtual screen. The screen used will be number id%.
If you specify -1 for the id%, the output will be sent to the back buffer again.

Example:
// CREATESCREEN
PRINT "Monitor", 0,0
GRABSPRITE 1, 0,0,32,32

// Screen 0, Sprite 13
CREATESCREEN 0, 13, 128,128
// Use screen for all output
USESCREEN 0
PRINT "Offscreen", 0,0
DRAWSPRITE 1,0,32
// Switch back to the window
USESCREEN -1

// Draw the screen
DRAWSPRITE 13, 100,100
SHOWSCREEN
MOUSEWAIT

See also...