Function


nuGfxSwapCfbFuncSet


Syntax

void nuGfxSwapCfbFuncSet(NUGfxSwapCfbFunc func)
Arguments
func    call back function
Return Value
None
Description

Registers the call back function which is executed when the graphics task is completed

Registers the call back function which is executed before switching the frame buffer. When NU_SC_SWAPBUFFER is specified by the nuGfxTaskStart function, the registered call back function is executed at the completion of the graphics task. The NUScTask structure of the task which was executed last is sent to the func file as an argument. It is normally not necessary to call this function as it is called by the nuGfxInit function.

Example
/* Function to switch the frame buffer */
void gfxSwapCfbFunc(NUScTask* gfxTask)
{
  osViSwapBuffer(gfxTask->framebuffer);
}

void mainProc(void)
{
  /* Initialization of the graphics */
  nuGfxInit();

  /*  Registration of the call back function */
  nuGfxSwapCfbFuncSet(gfxSwapCfbFunc);
  ......
}

See Also

nuGfxInit, nuGfxSwapCfb, nuGfxTaskStart, and nuGfxSwapCfbFuncRemove