1<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> 2<html> 3 4<head> 5<META http-equiv="Content-Type" content="text/html; charset=windows-1252"> 6<META name="GENERATOR" content="Microsoft FrontPage 5.0"> 7<META http-equiv="Content-Style-Type" content="text/css"> 8<LINK rel="stylesheet" type="text/css" href="../../CSS/revolution.css"> 9<title>GXEndDisplayList</title> 10</head> 11 12<body> 13 14<h1 align="left">GXEndDisplayList</h1> 15 16<h2>C Specification</h2> 17 18<dl> 19<dd><pre><CODE>#include <revolution/gx.h></CODE></pre> 20 </dd> 21<dd><pre><CODE>u32 GXEndDisplayList( void );</CODE></pre> 22 </dd> 23</dl> 24 25<h2>Arguments</h2> 26 27<p>None.</p> 28 29<h2>Return Values</h2> 30 31<P>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.</P> 32<H2>Description</H2> 33<P>This function ends a display list and resumes writing graphics commands to the CPU <a href="../list.html#Graphics FIFO">FIFO</a>. It returns the size of the display list written to the display list buffer since <a href="GXBeginDisplayList.html"><code>GXBeginDisplayList</code></a> 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 <code>GX_NOP(0x00)</code>.</P> 34<P>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. <a href="GXEndDisplayList.html"><code>GXEndDisplayList</code></a> calls <a href="../Management/GXFlush.html">GXFlush</a>, and thus it's not necessary to call <a href="../Management/GXFlush.html">GXFlush</a> explicitly after creating the display list.</P> 35<P>A display list cannot be nested; i.e., no display list functions (<a href="GXBeginDisplayList.html"><code>GXBeginDisplayList</code></a>, <a href="GXEndDisplayList.html"><code>GXEndDisplayList</code></a>, and <a href="GXCallDisplayList.html"><code>GXCallDisplayList</code></a>) can be called between a <a href="GXBeginDisplayList.html"><code>GXBeginDisplayList</code></a> and <a href="GXEndDisplayList.html"><code>GXEndDisplayList</code></a> pair.</P> 36<P>To execute a display list, use <a href="GXCallDisplayList.html"><code>GXCallDisplayList</code></a>.</P> 37 38<h2>See Also</h2> 39<P><a href="GXBeginDisplayList.html">GXBeginDisplayList</a> <br> <a href="GXCallDisplayList.html">GXCallDisplayList </a> 40</P> 41<H2>Revision History</H2> 42<P>03/01/2006 Initial version.</P> 43</BODY> 44</HTML> 45