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>glSaveProgramsDMP</title> 8 </head> 9 <body> 10<h1><CODE>glSaveProgramsDMP</CODE> Function</h1> 11<h2>Syntax</h2> 12 <div class="section"> 13 <pre class="definition"> 14GL_APICALL GLsizei GL_APIENTRY glSaveProgramsDMP( 15 GLuint n, 16 GLuint * progs, 17 GLuint flags, 18 GLsizei bufsize, 19 GLvoid * data 20); 21</pre> 22 </div> 23<h2>Arguments</h2> 24 <div class="section"> 25 <table class="arguments"> 26 <thead> 27 <tr> 28 <td width="15" /> 29<th>Name</th> 30<td>Description</td> 31 </tr> 32 </thead> 33 <tr> 34<td>in</td> 35<th>n</th> 36<td>Number of program objects.</td> 37 </tr> 38 <tr> 39<td>in</td> 40<th>progs</th> 41<td>Pointer to an array storing the program objects.</td> 42 </tr> 43 <tr> 44<td>in</td> 45<th>flags</th> 46<td>Setting for the state to save (<CODE>GL_SAVE_PROGRAMS_DMP</CODE>).</td> 47 </tr> 48 <tr> 49<td>in</td> 50<th>bufsize</th> 51<td>Size (in bytes) of the region storing the save data.</td> 52 </tr> 53 <tr> 54<td>out</td> 55<th>data</th> 56<td>Pointer to the region storing the save data.</td> 57 </tr> </table> 58 </div> 59<h2>Return Values</h2> 60<div class="section">Returns the size (in bytes) of the saved data. </div> 61<h2>Description</h2> 62 <div class="section"> 63<p>Saves the program object state.</p><P> 64Set <SPAN class="argument">n</SPAN> to the number of program objects stored in <SPAN class="argument">progs</SPAN>. Set <SPAN class="argument">progs</SPAN> to a pointer to an array storing the program objects. <CODE>GL_SAVE_PROGRAMS_DMP</CODE> is the only possible value for the <SPAN class="argument">flags</SPAN> argument. Setting this saves the state for all program objects. If you set <SPAN class="argument">flags</SPAN> to a bitwise OR with <CODE>GL_SAVE_PROGRAMS_CTR_FORMAT_DMP</CODE>, you can save in the development hardware's data format from PicaOnDesktop. You cannot restore the development hardware's data format from the PicaOnDesktop environment. 65 </P><P> 66Set <SPAN class="argument">bufsize</SPAN> to the size (in bytes) of the array specified by <SPAN class="argument">data</SPAN>. A <CODE>GL_INVALID_OPERATION</CODE> error occurs when <SPAN class="argument">data</SPAN> is nonzero and less than the number of bytes of save data. Set <SPAN class="argument">data</SPAN> to a pointer to the region where the data should be saved. If you set it to <CODE>0</CODE>, data is not saved. The return value gives the number of bytes of data to save. 67 </P><P> 68The following errors occur in this function. 69<TABLE><TR><TH><CODE>GL_INVALID_VALUE</CODE></TH><TD><SPAN class="argument">n</SPAN> or <SPAN class="argument">progs</SPAN> is <CODE>0</CODE>, or <SPAN class="argument">flags</SPAN> is not <CODE>GL_SAVE_PROGRAMS_DMP</CODE>.</TD></TR><TR><TH><CODE>GL_INVALID_OPERATION</CODE></TH><TD>An invalid or unlinked program object is stored in <SPAN class="argument">progs</SPAN>, or the save data exceeds the number of bytes specified by <SPAN class="argument">bufsize</SPAN>.</TD></TR><TR><TH><CODE>GL_OUT_OF_MEMORY</CODE></TH><TD>Failed to allocate memory that is used internally.</TD></TR></TABLE><!-- source n、progsが0の場合、およびflagsがGL_SAVE_PROGRAMS_DMPでない場合エラーGL_INVALID_VALUEを生成します。 progsに格納されるプログラムオブジェクトが不正、またはリンクがされていない場合エラーGL_INVALID_OPERATIONを生成します。 内部で使用するメモリの確保に失敗した場合エラーGL_OUT_OF_MEMORYを生成します。 --></P></div> 70<h2>Revision History</h2> 71 <div class="section"> 72 <dl class="history"> 73 <dt>2010/01/07</dt> 74<dd>Initial version.<br /> 75 </dd> 76 </dl> 77 </div> 78 <hr><p>CONFIDENTIAL</p></body> 79</html>