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>nngxAddL2BTransferCommand</title> 8 </head> 9 <body> 10<h1><CODE>nngxAddL2BTransferCommand</CODE> Function</h1> 11<h2>Syntax</h2> 12 <div class="section"> 13 <pre class="definition"> 14NNGX_APICALL void NNGX_APIENTRY nngxAddL2BTransferCommand( 15 const GLvoid * srcaddr, 16 GLvoid * dstaddr, 17 GLsizei width, 18 GLsizei height, 19 GLenum format, 20 GLsizei blocksize 21); 22</pre> 23 </div> 24<h2>Arguments</h2> 25 <div class="section"> 26 <table class="arguments"> 27 <thead> 28 <tr> 29 <td width="15" /> 30<th>Name</th> 31<td>Description</td> 32 </tr> 33 </thead> 34 <tr> 35<td>in</td> 36<th>srcaddr</th> 37<td>Transfer source linear image address.</td> 38 </tr> 39 <tr> 40<td>out</td> 41<th>dstaddr</th> 42<td>Transfer source block image storage address.</td> 43 </tr> 44 <tr> 45<td>in</td> 46<th>width</th> 47<td>Transfer source and destination image width.</td> 48 </tr> 49 <tr> 50<td>in</td> 51<th>height</th> 52<td>Transfer source and destination image height.</td> 53 </tr> 54 <tr> 55<td>in</td> 56<th>format</th> 57<td>Transfer image pixel format.</td> 58 </tr> 59 <tr> 60<td>in</td> 61<th>blocksize</th> 62<td>Block image block size (<CODE>8</CODE> or <CODE>32</CODE>).</td> 63 </tr> </table> 64 </div> 65<h2>Return Values</h2> 66<div class="section">There is no return value. </div> 67<h2>Description</h2> 68 <div class="section"> 69<p>Adds a command to convert from a linear image into a block image and then to transfer it.</p><P> 70This function converts a linear image to a block image. (In other words, it converts from the format used for display to the format used for rendering.) Although the <CODE>nngxTransferLinearImage</CODE> function provides equivalent functionality, this function has more general uses. Also, like <CODE>nngxTransferLinearImage</CODE>, this function only adds a transfer request command without adding a 3D split command. 71 </P><P> 72Specify the start address of the transfer source linear image with the <SPAN class="argument">srcaddr</SPAN> argument. Specify the start address of the transfer destination block image with the <SPAN class="argument">dstaddr</SPAN> argument. Both <SPAN class="argument">srcaddr</SPAN> and <SPAN class="argument">dstaddr</SPAN> must be 16-byte aligned. 73 </P><P> 74Specify the width and height of both the original and transferred images (in pixels) with <SPAN class="argument">width</SPAN> and <SPAN class="argument">height</SPAN>. Both images must have the same width and height. 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, the width must be a multiple of 32. This function exits without adding any commands if either <SPAN class="argument">width</SPAN> or <SPAN class="argument">height</SPAN> is <CODE>0</CODE>. 75 </P><P> 76Specify the pixel format of the transferred image with the <SPAN class="argument">format</SPAN> argument. The original image must have the same format as the transferred image. The exception is when <SPAN class="argument">format</SPAN> is 24-bit, in which case the original image must use a 32-bit format. For each four-byte block of the original data that is transferred, the first byte is discarded. (The hardware does not support transfers between 24-bit formats. ) Specify the pixel format with one of the following macros. 77<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> 78Specify <SPAN class="argument">blocksize</SPAN> to be <CODE>8</CODE> or <CODE>32</CODE>. When set to <CODE>8</CODE>, the image is converted to a block image with a block size of 8. When set to <CODE>32</CODE>, the image is converted to a block image with a block size of 32. 79 </P><P> 80The following errors occur with this function. 81<TABLE><TR><TH>GL_ERROR_806F_DMP</TH><TD>0 is bound to the current command list or the command request queue is full.</TD></TR><TR><TH>GL_ERROR_8070_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_8071_DMP</TH><TD><SPAN class="argument">blocksize</SPAN> is neither 8 nor 32.</TD></TR><TR><TH>GL_ERROR_8072_DMP</TH><TD>The <SPAN class="argument">width</SPAN> or <SPAN class="argument">height</SPAN> argument is set to an invalid value.</TD></TR><TR><TH>GL_ERROR_8073_DMP</TH><TD>The <SPAN class="argument">format</SPAN> argument is set to an invalid value.</TD></TR></TABLE></P></div> 82<h2>Revision History</h2> 83 <div class="section"> 84 <dl class="history"> 85 <dt>2010/09/15</dt> 86<dd>Initial version.<br /> 87 </dd> 88 </dl> 89 </div> 90 <hr><p>CONFIDENTIAL</p></body> 91</html>