1<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
2<HTML>
3<HEAD>
4<META http-equiv="Content-Type" content="text/html; charset=windows-1252">
5<META http-equiv="Content-Style-Type" content="text/css">
6<META name="GENERATOR" content="Microsoft FrontPage 5.0">
7<LINK rel="stylesheet" type="text/css" href="../CSS/revolution.css">
8<TITLE>GDInitGDLObj</TITLE>
9</HEAD>
10<BODY>
11<H1 align="left">GDInitGDLObj</H1>
12
13<H2>Syntax</H2>
14<dl><dd><pre class="construction">
15#include &lt;revolution/gd.h&gt;
16
17void GDInitGDLObj(
18    <A href="GDLObj.html">GDLObj</A>* dl,
19    void*   start,
20    u32     length );
21</pre></dd></dl>
22
23<H2>Arguments</H2>
24<TABLE class="arguments" border="1" >
25  <TBODY>
26    <TR>
27<TH><STRONG><EM><CODE>dl</CODE></EM></STRONG></TH>
28<TD>Pointer to a graphics display list object.</TD>
29    </TR>
30    <TR>
31<TH>start</TH>
32<TD>Pointer to a memory buffer that will contain the actual display list commands. Must have 32-byte alignment.</TD>
33    </TR>
34    <TR>
35<TH>length</TH>
36<TD>Length of the memory buffer in bytes. Must be a multiple of 32.</TD>
37    </TR>
38  </TBODY>
39</TABLE>
40
41<H2>Return Values</H2>
42<P>None.</P>
43
44<H2>Description</H2>
45<P>This function initializes a <A href="GDLObj.html"><CODE>GDLObj</CODE></A>--an object that manages display lists. Nearly all GD library functions operate in a manner based on <A href="GDLObj.html"><CODE>GDLObj</CODE></A> (usually &quot;current&quot; <A href="GDLObj.html"><CODE>GDLObj</CODE></A>). The argument <SPAN class="argument">dl</SPAN> specifies a pointer to the <A href="GDLObj.html"><CODE>GDLObj</CODE></A> to be initialized. First, a memory buffer must be allocated for use by <A href="GDLObj.html"><CODE>GDLObj</CODE></A> (in order to store the actual display list). This memory buffer must be 32-byte aligned. The arguments <SPAN class="argument">start</SPAN> and <SPAN class="argument">length</SPAN> are used to define this buffer. This function does not affect the buffer itself.</P>
46<P>The <CODE><STRONG>top</STRONG></CODE> field of the <A href="GDLObj.html"><CODE>GDLObj</CODE></A> is initialized to (<SPAN class="argument">start</SPAN> + <SPAN class="argument">length</SPAN>). The <CODE><STRONG>ptr</STRONG></CODE> field of the <A href="GDLObj.html"><CODE>GDLObj</CODE></A> is initialized to (<SPAN class="argument">start</SPAN>).</P>
47
48<H2>See Also</H2>
49<P class="reference">
50<A href="GDGetGDLObjStart.html">GDGetGDLObjStart</A>,
51<A href="GDGetGDLObjLength.html">GDGetGDLObjLength</A>,
52<A href="GDSetCurrent.html">GDSetCurrent</A>
53</P>
54
55<H2>Revision History</H2>
56<P>
572006/03/01 Initial version.<BR>
58</P>
59
60<hr><p>CONFIDENTIAL</p></body>
61</HTML>