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>ConvertTextureResourceToNativeFormat</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/Resource/Overview.html">Resource</a>::<a href="../../../../../nn/gd/CTR/Resource/Helper/Overview.html">Helper</a>::ConvertTextureResourceToNativeFormat</CODE> Member Function</h1> 11<h2>Syntax</h2> 12 <div class="section"> 13 <pre class="definition"> 14static <a href="../../../../../nnResult/Overview.html">nnResult</a> ConvertTextureResourceToNativeFormat( 15 <a href="../../../../../nn/gd/CTR/Resource/Format.html">Format</a> format, 16 <a href="../../../../../nn_types/u32.html">u32</a> width, 17 <a href="../../../../../nn_types/u32.html">u32</a> height, 18 const <a href="../../../../../nn_types/u8.html">u8</a> * dataSrc, 19 <a href="../../../../../nn_types/u8.html">u8</a> * dataDst, 20 <a href="../../../../../nn/gd/CTR/Resource/NativeFormat.html">NativeFormat</a> * pnativeFormat = NULL 21); 22</pre> 23 </div> 24<h2>Parameters</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>format</th> 37<td>Specifies the pixel format of <SPAN class="argument">dataSrc</SPAN>. The formats that can be specified are mentioned elsewhere in this section. </td> 38 </tr> 39 <tr> 40<td>in</td> 41<th>width</th> 42<td>Specifies the data width. </td> 43 </tr> 44 <tr> 45<td>in</td> 46<th>height</th> 47<td>Specifies the data height.</td> 48 </tr> 49 <tr> 50<td>in</td> 51<th>dataSrc</th> 52<td>Specifies the address of the source data for the conversion.</td> 53 </tr> 54 <tr> 55<td>in</td> 56<th>dataDst</th> 57<td>Specifies the destination address for the converted data.</td> 58 </tr> 59 <tr> 60<td>in</td> 61<th>pnativeFormat</th> 62<td>Specifies the address that will store the native format value received after conversion. This will not be used if <CODE>NULL</CODE> is specified.</td> 63 </tr> </table> 64 </div> 65<h2>Return Values</h2> 66<div class="section">Returns the result of the operation. <br /> 67 <table class="arguments"> 68 <thead> 69 <tr> 70<th>Value</th> 71<td>Description</td> 72 </tr> 73 </thead> 74 <tr> 75<th><CODE>Result::IsSuccess</CODE></th> 76<td>Process was successful.</td> 77 </tr> 78 <tr> 79<th><CODE>ResultNullParameter</CODE></th> 80<td><CODE>NULL</CODE> was specified for either <SPAN class="argument">dataSrc</SPAN> or <SPAN class="argument">dataDst</SPAN>.</td> 81 </tr> 82 <tr> 83<th><CODE>ResultInvalidTextureResolution</CODE></th> 84<td>Either <CODE>0</CODE> was specified for <SPAN class="argument">width</SPAN> or <SPAN class="argument">height</SPAN>, or the size is not a multiple of 8. This result will also be returned if <SPAN class="argument">format</SPAN> is invalid. </td> 85 </tr> 86 <tr> 87<th><CODE>ResultOutOfMemory</CODE></th> 88<td>Could not obtain memory.</td> 89 </tr> 90 <tr> 91<th><CODE>ResultInvalidTextureFormat</CODE></th> 92<td>Invalid pixel format.</td> 93 </tr> 94 </table> </div> 95<h2>Description</h2> 96 <div class="section"> 97<p>Converts the texture data into a native format. </p><p>You can specify the following pixel formats in <SPAN class="argument">format</SPAN>.<br /><br /><CODE>Resource::FORMAT_RGBA_8888</CODE><br /><CODE>Resource::FORMAT_RGB_888</CODE><br /><CODE>Resource::FORMAT_RGBA_5551</CODE><br /><CODE>Resource::FORMAT_RGB_565</CODE><br /><CODE>Resource::FORMAT_RGBA_4444</CODE><br /><CODE>Resource::FORMAT_LUMINANCE_ALPHA_88</CODE><br /><CODE>Resource::FORMAT_HILO_88</CODE><br /><CODE>Resource::FORMAT_LUMINANCE_8</CODE><br /><CODE>Resource::FORMAT_ALPHA_8</CODE><br /><CODE>Resource::FORMAT_LUMINANCE_ALPHA_44</CODE><br /><CODE>Resource::FORMAT_LUMINANCE_4</CODE><br /><CODE>Resource::FORMAT_ALPHA_4</CODE></p><!-- write here --></div> 98<h2>Revision History</h2> 99 <div class="section"> 100 <dl class="history"> 101 <dt>2011/02/17</dt> 102<dd>Initial version.<br /> 103 </dd> 104 </dl> 105 </div> 106 <hr><p>CONFIDENTIAL</p></body> 107</html>