DrawBuffer

Category: Images and Rendering

Back to System Functions


Signature

DrawBuffer(bufferReference As Integer, x As Integer, y As Integer)

Returns

Void

Description

Draws a previously rendered off-screen buffer at the given position. The destination position uses the same pixel coordinate system as other drawing functions.

This is useful for reusing pre-rendered UI panels, light masks, and scene layers without rebuilding them every time you want to place them on the screen.

Example

Graphics 640, 480 Dim panel As Integer panel = CreateBuffer(160, 48) SetBufferTarget panel Cls SetDrawColor 32, 32, 64, 255 DrawFilledRect 0, 0, 160, 48 ClearBufferTarget DrawBuffer panel, 24, 24