1<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
2<html xml:lang="en-US" lang="en-US" xmlns="http://www.w3.org/1999/xhtml">
3  <head>
4    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
5    <meta http-equiv="Content-Style-Type" content="text/css" />
6    <link rel="stylesheet" href="../css/manpage.css" type="text/css" />
7    <title>nngxAddB2LTransferCommand</title>
8  </head>
9  <body>
10    <h1><CODE>nngxAddB2LTransferCommand</CODE> Function</h1>
11    <h2>Syntax</h2>
12    <div class="section">
13      <pre class="definition">
14NNGX_APICALL void NNGX_APIENTRY nngxAddB2LTransferCommand(
15     const GLvoid * srcaddr,
16     GLsizei srcwidth,
17     GLsizei srcheight,
18     GLenum srcformat,
19     GLvoid * dstaddr,
20     GLsizei dstwidth,
21     GLsizei dstheight,
22     GLenum dstformat,
23     GLenum aamode,
24     GLboolean yflip,
25     GLsizei blocksize
26);
27</pre>
28    </div>
29    <h2>Arguments</h2>
30    <div class="section">
31      <table class="arguments">
32        <thead>
33          <tr>
34            <td width="15" />
35            <th>Name</th>
36            <td>Description</td>
37          </tr>
38        </thead>
39        <tr>
40          <td>in</td>
41          <th>srcaddr</th>
42          <td>Transfer source block image address.</td>
43        </tr>
44        <tr>
45          <td>in</td>
46          <th>srcwidth</th>
47          <td>Transfer source image width.</td>
48        </tr>
49        <tr>
50          <td>in</td>
51          <th>srcheight</th>
52          <td>Transfer source image height.</td>
53        </tr>
54        <tr>
55          <td>in</td>
56          <th>srcformat</th>
57          <td>Transfer source image pixel format.</td>
58        </tr>
59        <tr>
60          <td>out</td>
61          <th>dstaddr</th>
62          <td>Transfer destination linear image storage address.</td>
63        </tr>
64        <tr>
65          <td>in</td>
66          <th>dstwidth</th>
67          <td>Transfer destination image width.</td>
68        </tr>
69        <tr>
70          <td>in</td>
71          <th>dstheight</th>
72          <td>Transfer destination image height.</td>
73        </tr>
74        <tr>
75          <td>in</td>
76          <th>dstformat</th>
77          <td>Transfer destination image pixel format.</td>
78        </tr>
79        <tr>
80          <td>in</td>
81          <th>aamode</th>
82          <td>Antialias filter mode.</td>
83        </tr>
84        <tr>
85          <td>in</td>
86          <th>yflip</th>
87          <td>Whether to flip vertically when transferring images.</td>
88        </tr>
89        <tr>
90          <td>in</td>
91          <th>blocksize</th>
92          <td>Block image block size (<CODE>8</CODE> or <CODE>32</CODE>).</td>
93        </tr> </table>
94    </div>
95    <h2>Return Values</h2>
96    <div class="section">There is no return value. </div>
97    <h2>Description</h2>
98    <div class="section">
99      <p>This function adds a command to convert an image's format from block to linear before transferring it. </p><P>
100                It converts the format used for rendering (block) to the format used for display (linear). Although the <CODE>nngxTransferRenderImage</CODE> function provides equivalent functionality, this function has more general uses. Also, like the <CODE>nngxTransferRenderImage</CODE> function, this function only adds a transfer request command without adding a 3D split command.
101            </P><P>
102                The <SPAN class="argument">srcaddr</SPAN> argument specifies the start address of the transfer source block image. The <SPAN class="argument">dstaddr</SPAN> argument specifies the start address of the transfer destination linear image. Both <SPAN class="argument">srcaddr</SPAN> and <SPAN class="argument">dstaddr</SPAN> must be 16-byte aligned.
103            </P><P>
104                Specify the original image’s width and height in pixels with <SPAN class="argument">srcwidth</SPAN> and <SPAN class="argument">srcheight</SPAN>; specify the transferred image’s width and height in pixels with <SPAN class="argument">dstwidth</SPAN> and <SPAN class="argument">dstheight</SPAN>. These dimensions must all be multiples of the block size. The block size is either 8 or 32. However, if the transferred image uses 24 bits per pixel and a block size of 8, both the original and transferred images must have widths that are multiples of 16. This function exits and does nothing if any of the image dimensions is 0. The width and height of the transferred image must be less than or equal to the width and height of the original image.
105            </P><P>
106                Specify the pixel format of the original and transferred images with <SPAN class="argument">srcformat</SPAN> and <SPAN class="argument">dstformat</SPAN>. Specify the pixel format with one of the following macros.
107             <TABLE><TR><TH>GL_RGBA8_OES</TH><TD>32-bit RGBA8</TD></TR><TR><TH>GL_RGB8_OES</TH><TD>24-bit RGB8</TD></TR><TR><TH>GL_RGBA4</TH><TD>16-bit RGBA4</TD></TR><TR><TH>GL_RGB5_A1</TH><TD>16-bit RGBA5551</TD></TR><TR><TH>GL_RGB565</TH><TD>16-bit RGB565</TD></TR></TABLE></P><P>
108                Conversions that increase the pixel size are not possible. For example, you cannot convert from a 24-bit format to a 32-bit format or from a 16-bit format to either a 24- or 32-bit format.
109            </P><P>
110                Specify the antialiasing filter mode with <SPAN class="argument">aamode</SPAN>. Specify the mode with one of the following macros.
111                <TABLE><TR><TH>NN_GX_ANTIALIASE_NOT_USED</TH><TD>No antialiasing</TD></TR><TR><TH>NN_GX_ANTIALIASE_2x1</TH><TD>Transfer with 2x1 antialiasing</TD></TR><TR><TH>NN_GX_ANTIALIASE_2x2</TH><TD>Transfer with 2x2 antialiasing</TD></TR></TABLE>
112                When antialiasing is enabled, the transferred image is shrunk in half in the filtering direction. Specifically, 2x2 antialiasing shrinks the image in half vertically <I>and</I> horizontally, and 2x1 antialiasing shrinks the image in half horizontally.
113            </P><P>
114                The transferred image is flipped vertically when <SPAN class="argument">yflip</SPAN> is <CODE>GL_TRUE</CODE>. It is not flipped when <SPAN class="argument">yflip</SPAN> is <CODE>GL_FALSE</CODE>. Nonzero values are considered to be <CODE>GL_TRUE</CODE>.
115            </P><P>
116                Specify <SPAN class="argument">blocksize</SPAN> to be <CODE>8</CODE> or <CODE>32</CODE>. When set to 8, the transfer source image is transferred with a block size of 8. When set to 32, the transfer source image is transferred with a block size of 32.
117            </P><P>
118                The following errors occur with this function.
119                <TABLE><TR><TH>GL_ERROR_807C_DMP</TH><TD>0 is bound to the current command list or the command request queue is full.</TD></TR><TR><TH>GL_ERROR_807D_DMP</TH><TD><SPAN class="argument">srcaddr</SPAN> or <SPAN class="argument">dstaddr</SPAN> is not 16-byte aligned.</TD></TR><TR><TH>GL_ERROR_807E_DMP</TH><TD><SPAN class="argument">blocksize</SPAN> is neither 8 nor 32.</TD></TR><TR><TH>GL_ERROR_807F_DMP</TH><TD>The <span class="argument">aamode</span> argument is set to an invalid value.</TD></TR><TR><TH>GL_ERROR_8080_DMP</TH><TD>The <SPAN class="argument">srcformat</SPAN> and <SPAN class="argument">dstformat</SPAN> arguments are set to invalid values.</TD></TR><TR><TH>GL_ERROR_8081_DMP</TH><TD>The <SPAN class="argument">dstformat</SPAN> argument has a larger pixel size than the <SPAN class="argument">srcformat</SPAN> argument.</TD></TR><TR><TH>GL_ERROR_8082_DMP</TH><TD>The <SPAN class="argument">srcwidth</SPAN>, <SPAN class="argument">srcheight</SPAN>, <SPAN class="argument">dstwidth</SPAN>, or <SPAN class="argument">dstheight</SPAN> argument is set to an invalid value.</TD></TR><TR><TH>GL_ERROR_8083_DMP</TH><TD>The width or height of the transferred image is larger than the original image.</TD></TR></TABLE></P></div>
120    <h2>Revision History</h2>
121    <div class="section">
122      <dl class="history">
123        <dt>2010/09/15</dt>
124        <dd>Initial version.<br />
125        </dd>
126      </dl>
127    </div>
128  <hr><p>CONFIDENTIAL</p></body>
129</html>