1<html> 2<head> 3<title>G2DDrawLayer</title> 4<meta http-equiv="Content-Type" content="text/html; charset=windows-1252"> 5<META http-equiv="Content-Style-Type" content="text/css"> 6<LINK rel="stylesheet" type="text/css" href="../CSS/revolution.css"> 7</head> 8<body> 9<h1>G2DDrawLayer</h1> 10<hr> 11<h2>C Specification</h2> 12<p> 13 <dl> 14 <dd> 15<pre><code>#include <revolution/include/G2D.h></code></pre> 16 <dd> 17<pre><code>void G2DDrawLayer( G2DLayer *layer, s8 *aSortBuffer );</code></pre> 18 </dd> 19 </dl> 20<P></P> 21<h2>Description</h2> 22<p><code>G2DDrawLayer</code> is a G2D API main function. This function renders data passed by <b><i><CODE>layer</CODE></i></b>. The <STRONG><i><CODE>aSortBuffer</CODE></i></STRONG> parameter is a pointer to the work buffer used for sorting tiles by material. The number of bytes that this buffer requires is six times the number of tiles that fill the viewport.</p> 23<p>This function determines the smallest set of tiles to overlap the viewport (see the figure below).</p> 24<p>Tiles are sorted by material order, and all tiles that have the same material are rendered together.</p> 25<p><img src="images/image002.gif" width="685" height="574"></p> 26<p class="MsoCaption" style='FONT-WEIGHT: bold'><span style='FONT-WEIGHT: bold'>Figure</span> <span style='FONT-WEIGHT: bold'>Example of Using the</span> <code>G2DDrawLayer</code> <span style='FONT-WEIGHT: bold'>Function</span></p> 27<h2>Arguments</h2> 28<table width="100%"> 29 <tr> 30 <td> 31<b><i><STRONG><EM><CODE>layer</CODE></EM></STRONG></i></b></td> 32 <td> 33Pointer to the <CODE>G2DLayer</CODE> structure.</td> 34 </tr> 35 <tr> 36<td><b><i><STRONG><EM><CODE>aSortBuffer</CODE></EM></STRONG></i></b></td> 37 <td> 38Pointer to the work space buffer.</td> 39 </tr> 40</table> 41<h2>Return Values</h2> 42None. 43<h2>See Also</h2> 44<h2>Revision History</h2> 45<p>03/01/2006 Initial version.</p> 46 </body> 47</html>