1<html> 2<head> 3<title><CODE>G2DDrawLayer</CODE></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 11<h2>Syntax</h2> 12<dl><dd><pre class="construction"> 13#include <revolution/G2D.h> 14 15void G2DDrawLayer( G2DLayer *layer, s8 *aSortBuffer ); 16</pre></dd></dl> 17 18<h2>Arguments</h2> 19<TABLE class="arguments" border="1" > 20 <tr> 21<th><STRONG><EM><CODE>layer</CODE></EM></STRONG></th> 22<td>Pointer to the <CODE>G2DLayer</CODE> structure.</td> 23 </tr> 24 <tr> 25<th><STRONG><EM><CODE>aSortBuffer</CODE></EM></STRONG></th> 26<td>Pointer to the workspace buffer.</td> 27 </tr> 28</table> 29 30<h2>Return Values</h2> 31<p>None.</p> 32 33<h2>Description</h2> 34<p>The <code>G2DDrawLayer</code> function is the main function of the G2D API. This function renders data passed by <code>*layer</code>. The parameter <code>aSortBuffer</code> represents a pointer to the work area used to sort tiles by material. The number of bytes that must be allocated for this buffer is six times the number of tiles that fill the viewport.</p> 35<p>This function determines the smallest set of tiles needed to overlap the viewport (see the figure below).</p> 36<p>Tiles are sorted according to the material used and tiles having the same material are all rendered together.</p> 37<p><img src="images/image002.gif" width="685" height="574"></p> 38<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> 39 40<h2>See Also</h2> 41<p>None.</p> 42 43<h2>Revision History</h2> 44<p> 452006/03/01 Initial version.<br> 46</p> 47 48<hr><p>CONFIDENTIAL</p></body> 49</html>