GXEndDisplayList

C Specification

#include <revolution/gx.h>
u32 GXEndDisplayList( void );

Arguments

None.

Return Values

Returns the size of the display list in bytes unless size exceeds the buffer such as under conditions where 0 is returned. ASSERT errors also occur under conditions like this when using the debug library.

Description

This function ends a display list and resumes writing graphics commands to the CPU FIFO. It returns the size of the display list written to the display list buffer since GXBeginDisplayList was called. If the display list size exceeds the size of the buffer allocated the function will fault with an ASSERT error. In the case of optimized libraries, where ASSERT errors do not occur, a zero length size will be returned. The display list size is a multiple of 32B and any unsed commands in the last 32B will be padded with GX_NOP(0x00).

Due to the mechanics of flushing the write-gather pipe (which is used to create the display list), the display buffer should be at least 32 bytes larger than the maximum expected amount of data stored. GXEndDisplayList calls GXFlush, and thus it's not necessary to call GXFlush explicitly after creating the display list.

A display list cannot be nested; i.e., no display list functions (GXBeginDisplayList, GXEndDisplayList, and GXCallDisplayList) can be called between a GXBeginDisplayList and GXEndDisplayList pair.

To execute a display list, use GXCallDisplayList.

See Also

GXBeginDisplayList
GXCallDisplayList

Revision History

2006/03/01 Initial version.


CONFIDENTIAL