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>CopyTexture2DResourceBlockToLinear</title> 8 </head> 9 <body> 10<h1><CODE><a href="../../../../nn/Overview.html">nn</a>::<a href="../../../../nn/gd/Overview.html">gd</a>::<a href="../../../../nn/gd/CTR/Overview.html">CTR</a>::<a href="../../../../nn/gd/CTR/Memory/Overview.html">Memory</a>::CopyTexture2DResourceBlockToLinear</CODE> Member Function</h1> 11<h2>Syntax</h2> 12 <div class="section"> 13 <pre class="definition"> 14static <a href="../../../../nnResult/Overview.html">nnResult</a> CopyTexture2DResourceBlockToLinear( 15 const Texture2DResource * source, 16 <a href="../../../../nn_types/s32.html">s32</a> srcMipLevelIndex, 17 <a href="../../../../nn_types/u32.html">u32</a> srcOffsetY, 18 <a href="../../../../nn_types/u8.html">u8</a> * dstAddr, 19 <a href="../../../../nn_types/u32.html">u32</a> dstWidth, 20 <a href="../../../../nn_types/u32.html">u32</a> dstHeight, 21 <a href="../../../../nn_types/u32.html">u32</a> dstFormat, 22 <a href="../../../../nn/gd/CTR/Memory/DownScalingMode.html">DownScalingMode</a> downScalingMode, 23 <span>gdBool</span> yFlip 24); 25</pre> 26 </div> 27<h2>Parameters</h2> 28 <div class="section"> 29 <table class="arguments"> 30 <thead> 31 <tr> 32 <td width="15" /> 33<th>Name</th> 34<td>Description</td> 35 </tr> 36 </thead> 37 <tr> 38<td>in</td> 39<th>source</th> 40<td>Pointer to the <CODE>Texture2DResource</CODE> resource transfer source.</td> 41 </tr> 42 <tr> 43<td>in</td> 44<th>srcMipLevelIndex</th> 45<td>Specifies the index of the mipmap level of the transfer source. If <CODE>-1</CODE> is specified, the last mipmap level index is used.</td> 46 </tr> 47 <tr> 48<td>in</td> 49<th>srcOffsetY</th> 50<td>Specifies the y offset of the transfer source. This value must be a multiple of <SPAN class="argument">srcBlockSize</SPAN> and must be less than the height of the transfer source resource.</td> 51 </tr> 52 <tr> 53<td>in</td> 54<th>dstAddr</th> 55<td>Specifies the address of the destination.</td> 56 </tr> 57 <tr> 58<td>in</td> 59<th>dstWidth</th> 60<td>Specifies the width of the destination. This value must be equal to or less than the width of the source. (Or, a size of one half the width of the transfer source when using mipmapping in the X-direction.)</td> 61 </tr> 62 <tr> 63<td>in</td> 64<th>dstHeight</th> 65<td>Specifies the height of the destination. This value must be less than or equal to the height of the transfer source minus <SPAN class="argument">srcOffsetY</SPAN>. (Or, a size of (<CODE>height-<SPAN class="argument">srcOffsetY</SPAN>)/2</CODE>) when using mipmapping in the Y-direction.)</td> 66 </tr> 67 <tr> 68<td>in</td> 69<th>dstFormat</th> 70<td>Specifies the pixel format of the destination.</td> 71 </tr> 72 <tr> 73<td>in</td> 74<th>downScalingMode</th> 75<td>Specifies antialiasing filter mode.</td> 76 </tr> 77 <tr> 78<td>in</td> 79<th>yFlip</th> 80<td>The transferred image is flipped vertically when <SPAN class="argument">yflip</SPAN> is <CODE>GD_TRUE</CODE>. The image is not flipped when <CODE>GD_FALSE</CODE>.</td> 81 </tr> </table> 82 </div> 83<h2>Return Values</h2> 84<div class="section">Returns the result of the operation. <br /> 85 <table class="arguments"> 86 <thead> 87 <tr> 88<th>Value</th> 89<td>Description</td> 90 </tr> 91 </thead> 92 <tr> 93<th>Result::IsSuccess</th> 94<td>The process was successful.</td> 95 </tr> 96 <tr> 97<th>ResultNullParameter</th> 98<td><CODE>NULL</CODE> was specified for <SPAN class="argument">source</SPAN> or <SPAN class="argument">dstAddr</SPAN>.</td> 99 </tr> 100 <tr> 101<th>ResultInvalidMemoryLayout</th> 102<td>Either the transfer source resource is not <CODE>LAYOUT_BLOCK_8</CODE> or <CODE>LAYOUT_BLOCK_32</CODE> format, or the transfer destination is not <CODE>LAYOUT_LINEAR</CODE>.</td> 103 </tr> 104 <tr> 105<th>ResultInvalidSubRegionResolution</th> 106<td>The height or width of the source or destination is not a multiple of the memory layout.</td> 107 </tr> 108 <tr> 109<th>ResultInvalidTextureOffset</th> 110<td><SPAN class="argument">srcOffsetY</SPAN>, <SPAN class="argument">srcCountRow</SPAN> or <SPAN class="argument">srcOffsetY</SPAN> are not multiples of the memory layout. Or, <SPAN class="argument">dstOffestY</SPAN> is larger than the transfer destination. Or, the source offset is larger than the height of the source resource, or the destination offset is larger than the height of the destination resource.</td> 111 </tr> 112 <tr> 113<th>ResultInvalidTextureResolution</th> 114<td><SPAN class="argument">downScalingMode</SPAN> is incorrect. Or, if the pixel format of the destination is 24-bit, the width of the source and/or destination is not a multiple of 16.</td> 115 </tr> 116 <tr> 117<th>ResultInvalidTextureMipLevelIndex</th> 118<td>The mipmap level index of the transfer source or transfer destination is invalid.</td> 119 </tr> 120 <tr> 121<th>ResultInvalidTextureFormat</th> 122<td>The pixel format of the transfer source or transfer destination is invalid.</td> 123 </tr> 124 </table> </div> 125<h2>Description</h2> 126 <div class="section"> 127<p>Adds a command for converting the source <SPAN class="Argument">Texture2DResource</SPAN> resource from a block image to a linear image and transferring it to the specified address.</p><p>The following transfer source and destination pixel formats can be specified:<br /><itemizedlist><listitem><para><CODE>NATIVE_FORMAT_RGBA_8888 </CODE><br /></para></listitem><listitem><para><CODE>NATIVE_FORMAT_RGB_888 </CODE><br /></para></listitem><listitem><para><CODE>NATIVE_FORMAT_RGBA_4444 </CODE><br /></para></listitem><listitem><para><CODE>NATIVE_FORMAT_RGBA_5551 </CODE><br /></para></listitem><listitem><para><CODE>NATIVE_FORMAT_RGB_565 </CODE><br /></para></listitem></itemizedlist><br /> The memory layout of the transfer source must be <CODE>LAYOUT_BLOCK_8</CODE> or <CODE>LAYOUT_BLOCK_32</CODE>. The transfer destination memory layout must be <CODE>LAYOUT_LINEAR</CODE>. The data transferred is automatically clipped if the source memory region (including <SPAN class="argument">srcMipLevelIndex</SPAN> and <SPAN class="argument">srcOffsetY</SPAN>) is bigger than the destination region (including <SPAN class="argument">downScalingMode</SPAN>). An error occurs if the source region is smaller than the destination region. When converting the pixel format, the source pixel size must be the same as or smaller than the destination pixel size. In other words, conversions that increase the pixel size are not possible. This process calls the <CODE>nngxAddB2LTransferCommand</CODE> function. <br /> This function adds commands to the command list. For more information, see the programming manual.</p><!-- write here --></div> 128<h2>Revision History</h2> 129 <div class="section"> 130 <dl class="history"> 131 <dt>2011/02/21</dt> 132<dd>Initial version.<br /> 133 </dd> 134 </dl> 135 </div> 136 <hr><p>CONFIDENTIAL</p></body> 137</html> 138