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>CopyTextureSubResource</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>::CopyTextureSubResource</CODE> Member Function</h1> 11<h2>Syntax</h2> 12 <div class="section"> 13 <pre class="definition"> 14static <a href="../../../../nnResult/Overview.html">nnResult</a> CopyTextureSubResource( 15 const Texture2DResource * source, 16 <a href="../../../../nn_types/s32.html">s32</a> srcMipLevelIndex, 17 const <a href="../../../../nn/gd/CTR/Memory/Rect/Overview.html">Rect</a> & rect, 18 const Texture2DResource * dest, 19 <a href="../../../../nn_types/s32.html">s32</a> dstMipLevelIndex, 20 <a href="../../../../nn_types/s32.html">s32</a> destPosX, 21 <a href="../../../../nn_types/s32.html">s32</a> destPosY 22); 23</pre> 24 </div> 25<h2>Parameters</h2> 26 <div class="section"> 27 <table class="arguments"> 28 <thead> 29 <tr> 30 <td width="15" /> 31<th>Name</th> 32<td>Description</td> 33 </tr> 34 </thead> 35 <tr> 36<td>in</td> 37<th>source</th> 38<td>Specifies a pointer to the source <CODE>Texture2DResource</CODE> resource.</td> 39 </tr> 40 <tr> 41<td>in</td> 42<th>srcMipLevelIndex</th> 43<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> 44 </tr> 45 <tr> 46<td>in</td> 47<th>rect</th> 48<td>Specifies the clipping area of the source. If <CODE>-1</CODE> is specified for <CODE>rect.width</CODE> or <CODE>rect.height</CODE>, width or height of the source resource is used.</td> 49 </tr> 50 <tr> 51<td>in</td> 52<th>dest</th> 53<td>Specifies a pointer to the <SPAN class="Argument">Texture2DResource</SPAN> of the transfer destination.</td> 54 </tr> 55 <tr> 56<td>in</td> 57<th>dstMipLevelIndex</th> 58<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> 59 </tr> 60 <tr> 61<td>in</td> 62<th><CODE>destPosX</CODE></th> 63<td>Specifies the X-position of the destination memory.</td> 64 </tr> 65 <tr> 66<td>in</td> 67<th><CODE>destPosY</CODE></th> 68<td>Specifies the Y-position of the destination memory.</td> 69 </tr> </table> 70 </div> 71<h2>Return Values</h2> 72<div class="section">Returns the result of the operation. <br /> 73 <table class="arguments"> 74 <thead> 75 <tr> 76<th>Value</th> 77<td>Description</td> 78 </tr> 79 </thead> 80 <tr> 81<th>Result::IsSuccess</th> 82<td>The process was successful.</td> 83 </tr> 84 <tr> 85<th>ResultNullParameter</th> 86<td><CODE>NULL</CODE> was specified for <SPAN class="Argument">source</SPAN> or <SPAN class="Argument">dest</SPAN>.</td> 87 </tr> 88 <tr> 89<th>ResultInvalidSubRegionResolution</th> 90<td>The <SPAN class="Argument">PosX</SPAN>, <SPAN class="Argument">PosY</SPAN>, <SPAN class="Argument">width</SPAN>, or <SPAN class="Argument">height</SPAN> of <a href="../../../../nn/gd/CTR/Memory/Rect/Overview.html">Rect</a> is not a multiple of 16. Or, the width or height of <a href="../../../../nn/gd/CTR/Memory/Rect/Overview.html">Rect</a> is less than zero. Or, <SPAN class="Argument">destPosX</SPAN> or destPosY<SPAN class="Argument"></SPAN> is not a multiple of 16.</td> 91 </tr> 92 <tr> 93<th>ResultInvalidTextureMipLevelIndex</th> 94<td>The index of the source or destination mipmap is larger than the mipmap level of the respective resource.</td> 95 </tr> 96 <tr> 97<th>ResultInvalidTextureFormat</th> 98<td>The pixel format bit size must be the same for the <SPAN class="argument">source</SPAN> and <SPAN class="argument">dest</SPAN> resources.</td> 99 </tr> 100 </table> </div> 101<h2>Description</h2> 102 <div class="section"> 103<p>Adds a command to the current command list for transferring a source <SPAN class="Argument">Texture2DResource</SPAN> texture to the destination <SPAN class="Argument">Texture2DResource</SPAN> texture.</p><p>Data is automatically clipped if the clipped area is separated from the source or destination area. A function with the same functionality as <CODE>nngxAddBlockImageCopyCommand</CODE> is called internally. This function adds commands to the command list. For more information, see the programming manual.</p><!-- write here --></div> 104<h2>Revision History</h2> 105 <div class="section"> 106 <dl class="history"> 107 <dt>2011/02/17</dt> 108<dd>Initial version.<br /> 109 </dd> 110 </dl> 111 </div> 112 <hr><p>CONFIDENTIAL</p></body> 113</html> 114