Index, dispatch, and monitor the operations in a blit

Name

ggiBltSetIdx, ggiBltGetIdx, ggiBltGo, ggiBltAt : Index, dispatch, and monitor the operations in a blit

Synopsis

#include <ggi/blt.h>

int ggiBltSetIdx(ggiBlt_t blt, int idx);

int ggiBltGetIdx(ggiBlt_t blt, int *idx);

int ggiBltGo(ggiBlt_t blt, int start, int numrows);

int ggiBltAt(ggiBlt_t blt);

Description

ggiBltGo sends precompiled commands contained in a blit to the target for rendering. Commands are sent starting at the command at the row with index idx, and proceeds for numrows rows (i.e. setting numrows to 0 will result in no rows being sent.) The function returns when the commands have all been dispatched, which does not mean that they have been rendered to the screen.

ggiBltAt may be used in a threaded application to check the progress of command dispatch while ggiBltGo is chewing on a blit. It will return the index of the row currently being dispatched, or the first row which will not be dispatched after ggiBltGo has completed. Note again, that this does not guarantee that the associated rendering commands have completed, only that they have been dispatched to the target.

To force all rendering to be completed, use the LibGGI function ggiFlush(3).

ggiBltSetIdx and ggiBltGetIdx set or retrieve, respectively, the index of the row in the blit to which the next ggiBltPut* function will store a precompiled command.

Return value

Except for ggiBltAt, whose return value is described above, all functions return zero (GGI_OK) or a negative error code on failure.