Function


nuGfxInit


Syntax

void nuGfxInit(void)
Arguments
None
Return Value
None
Description

Initializes and starts the graphics thread and the graphics task manager

The following initialization and setup is performed by the nuGfxInit function.

* Start the graphics thread

Create and start the thread which synchronizes with retrace and executes the retrace call back function. The call back function retrace is registered by the nuGfxFuncSet function.

This thread is synchronized with the PRE_NMI event and executes the PRE_NMI call back function. Register the PRE_NMI call back function with the nuGfxPreNMIFuncSet function.

* Registration of the frame buffer, the Z-Buffer, FIFO buffer, and the graphics microcode
Set addresses of the frame buffer and Z-Buffer in the graphics task manager. Also, set the size and address of the FIFO buffer. And register the graphics microcodes. By default, three frame buffers are reserved from 0x8038F800 of RDRAM by 320 x 240 16 bit. The Z-Buffer is reserved from 0x80000400 by 320x240. And FIFO buffer is reserved in nuRDPOutputBuf by 0x20000. F3D microcodes and L3DEX/S2DEX are reserved. The frame buffer can be reset using the nuGfxSetCfb function. The Z-Buffer can be reset using the nuGfxSetZBuffer function. The FIFO buffer can be set using the nuGfxSetUcodeFifo function. The graphics microcode can be registered again using the nuGfxSetUcode function.
* Registration of the call back function which is executed when completing the graphics task.
When NU_GFX_SWAPBUFFER is specified as an argument, if the nuGfxTaskStart function is executed, the nuGfxSwapCfb function is registered as the function which is called when completing the task.
* Initialization of the RDP
Initial setting of the RDP is performed by starting the graphics task since the value of RDP is not fixed.

The nuGfxTaskStart function can be used after calling this function.

See Also

nuGfxFuncSet, nuGfxSetCfb, nuGfxSetZBuffer, nuGfxSetUcode, nuGfxSwapCfb, nuGfxSwapCfbFuncSet, and nuGfxSetUcodeFifo


Revision History

8/4/99 Added the description of the setup function for FIFO buffer