DrawImage

Uses CopyVRAMPages() to draw an image.

Synopsis

bool DrawImage (Item iScreen, ubyte *pbImage, ScreenContext *sc)

Description

Uses the fast SPORT mechanism, CopyVRAMPages(), to project an image into a frame buffer. The image must be stored in page aligned VRAM. The function executes during a vertical blank.

Note that this function creates and deletes an IOReq item to communicate with the SPORT device every single time it is called. This is not efficient and decreases performance. It is better to allocate the IOReq once at the beginning of a program, and reuse it throughout. Therefore, you're better off not using DrawImage(), and just call CopyVRAMPages() yourself. This function is useful only in a do-it-just-once type of situation.

Arguments

iScreen
Item for the screen into which to project the image.
pbImage
Pointer to a page-aligned buffer in VRAM containing a full-screen 16-bit image.
sc
Pointer to a screen context.

Return Value

TRUE if successful, FALSE if not.

Associated Files

lib3do.lib, displayutils.h