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/s32.html">s32</a> srcCountRow, 19 const Texture2DResource * dest, 20 <a href="../../../../nn_types/s32.html">s32</a> dstMipLevelIndex, 21 <a href="../../../../nn_types/u32.html">u32</a> dstOffestY, 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><CODE>source</CODE></th> 40<td>Pointer to the <CODE>Texture2DResource</CODE> resource transfer source.</td> 41 </tr> 42 <tr> 43<td>in</td> 44<th><CODE>srcMipLevelIndex</CODE></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><CODE>srcOffsetY</CODE></th> 50<td>Specifies the Y offset of the transfer source. This value must be a multiple of <SPAN class="argument">srcBlockSize</SPAN> and less than the height of the mipmap level of the transfer source.</td> 51 </tr> 52 <tr> 53<td>in</td> 54<th><CODE>srcCountRow</CODE></th> 55<td>Specifies the height to transfer. If <CODE>-1</CODE> is specified, the size to transfer is found by subtracting <SPAN class="argument">srcOffsetY</SPAN> from the height of the transfer source resource. <SPAN class="Argument">srcCountRow</SPAN> is a multiple of <SPAN class="Argument">srcBlockSize</SPAN>. The sum (<SPAN class="argument">srcOffsetY</SPAN> + <SPAN class="argument">srcCountRow</SPAN>) must be equal to or less than the height of the transfer source resource.</td> 56 </tr> 57 <tr> 58<td>in</td> 59<th><CODE>dest</CODE></th> 60<td>Specifies a pointer to the <CODE>Texture2DResource</CODE> of the transfer destination.</td> 61 </tr> 62 <tr> 63<td>in</td> 64<th><CODE>dstMipLevelIndex</CODE></th> 65<td>Specifies the index of the mipmap level of the transfer destination. If <CODE>-1</CODE> is specified, the last mipmap level index is used. </td> 66 </tr> 67 <tr> 68<td>in</td> 69<th><CODE>dstOffestY</CODE></th> 70<td>Specifies the Y offset of the transfer destination.</td> 71 </tr> 72 <tr> 73<td>in</td> 74<th><CODE>downScalingMode</CODE></th> 75<td>Specifies antialiasing filter mode.</td> 76 </tr> 77 <tr> 78<td>in</td> 79<th><CODE>yFlip</CODE></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><CODE>Result::IsSuccess</CODE></th> 94<td>Process was successful.</td> 95 </tr> 96 <tr> 97<th><CODE>ResultNullParameter</CODE></th> 98<td><CODE>NULL</CODE> was specified for <SPAN class="argument">source</SPAN> or <SPAN class="argument">dest</SPAN>.</td> 99 </tr> 100 <tr> 101<th><CODE>ResultInvalidMemoryLayout</CODE></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><CODE>ResultInvalidTextureOffset</CODE></th> 106<td><SPAN class="argument">srcOffsetY</SPAN> is not a multiple of the memory layout for <SPAN class="argument">source</SPAN>. Or, the transfer source offset <SPAN class="argument">srcOffsetY</SPAN> is taller than the transfer source resource.</td> 107 </tr> 108 <tr> 109<th><CODE>ResultInvalidTextureMipLevelIndex</CODE></th> 110<td>The mipmap level index of the transfer source or transfer destination is invalid.</td> 111 </tr> 112 <tr> 113<th><CODE>ResultInvalidTextureFormat</CODE></th> 114<td>The pixel format of the transfer source or transfer destination is invalid.</td> 115 </tr> 116 <tr> 117<th><CODE>ResultInvalidSubRegionResolution</CODE></th> 118<td>The transfer source destination <SPAN class="argument">dstWidth</SPAN> or <SPAN class="argument">dstHeight</SPAN> is not a multiple of the memory layout for <SPAN class="argument">source</SPAN>.</td> 119 </tr> 120 </table> </div> 121<h2>Description</h2> 122 <div class="section"> 123<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 destination <SPAN class="argument">Texture2DResource</SPAN>.</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>, <SPAN class="argument">srcOffsetY</SPAN> and <SPAN class="argument">srcCountRow</SPAN>) is bigger than the destination region (including <SPAN class="argument">srcMipLevelIndex</SPAN>, <SPAN class="argument">srcOffsetY</SPAN> and <SPAN class="argument">srcCountRow</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. Refer to the Programming Manual for details.</p><!-- write here --></div> 124<h2>Revision History</h2> 125 <div class="section"> 126 <dl class="history"> 127 <dt>2011/02/21</dt> 128<dd>Initial version.<br /> 129 </dd> 130 </dl> 131 </div> 132 <hr><p>CONFIDENTIAL</p></body> 133</html>