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>glGetProgramiv</title>
8  </head>
9  <body>
10<h1>glGetProgramiv Function</h1>
11<h2>Syntax</h2>
12    <div class="section">
13      <pre class="definition">
14GL_APICALL void GL_APIENTRY glGetProgramiv(
15     GLuint program,
16     GLenum pname,
17     GLint * params
18);
19</pre>
20    </div>
21<h2>Arguments</h2>
22    <div class="section">
23      <table class="arguments">
24        <thead>
25          <tr>
26            <td width="15" />
27<th>Name</th>
28<td>Description</td>
29          </tr>
30        </thead>
31        <tr>
32<td>in</td>
33<th>program</th>
34<td>Program object</td>
35        </tr>
36        <tr>
37<td>in</td>
38<th>pname</th>
39<td>Name of the parameter to get</td>
40        </tr>
41        <tr>
42<td>out</td>
43<th>params</th>
44<td>Region storing the obtained parameters</td>
45        </tr> </table>
46    </div>
47<h2>Return Values</h2>
48<div class="section">No values are returned. </div>
49<h2>Description</h2>
50    <div class="section">
51<p>Gets program object parameters.</p><P>
52Set <span class="argument">program</span> to the program object.
53            </P><P>
54Set <span class="argument">pname</span> to one of the following values.
55<TABLE><TR><TH>GL_DELETE_STATUS</TH><TD>Gets <code>GL_TRUE</code> if the program object is waiting to be deleted and <code>GL_FALSE</code> otherwise. A program object in use by <code>glUseProgram</code> begins &quot;waiting to be deleted&quot; when <code>glDeleteProgram</code> is called on it.</TD></TR><TR><TH>GL_LINK_STATUS</TH><TD>Gets <code>GL_TRUE</code> if the program object has been successfully linked by <code>glLinkProgram</code> and <code>GL_FALSE</code> otherwise.</TD></TR><TR><TH>GL_INFO_LOG_LENGTH</TH><TD>Always gets a value of 0.</TD></TR><TR><TH>GL_ATTACHED_SHADERS</TH><TD>Gets the number of shader objects attached to the program.</TD></TR><TR><TH>GL_ACTIVE_ATTRIBUTES</TH><TD>Gets the number of active vertex attributes in the program.</TD></TR><TR><TH>GL_ACTIVE_ATTRIBUTE_MAX_LENGTH</TH><TD>Gets the number of characters in the name of the longest-named active vertex attribute in the program. A NULL terminator is also included in the character count.</TD></TR><TR><TH>GL_ACTIVE_UNIFORMS</TH><TD>Gets the number of active uniforms in the program.</TD></TR><TR><TH>GL_ACTIVE_UNIFORM_MAX_LENGTH</TH><TD>Gets the number of characters in the name of the longest-named active uniform in the program. A NULL terminator is also included in the character count.</TD></TR></TABLE><!-- source                      pnameにはGL_DELETE_STATUS、GL_LINK_STATUS、GL_VALIDATE_STATUS、GL_INFO_LOG_LENGTH、 GL_ATTACHED_SHADERS、GL_ACTIVE_ATTRIBUTES、GL_ACTIVE_ATTRIBUTE_MAX_LENGTH、GL_ACTIVE_UNIFORMS、 GL_ACTIVE_UNIFORM_MAX_LENGTHが指定できます。GL_DELETE_STATUSを指定した場合、プログラムオブジェクトが削除待ち状態である場合にGL_TRUEが取得され、それ以外の場合にGL_FALSEが取得されます。 glUseProgramにより使用中となっているプログラムオブジェクトに対し、glDeleteProgramを呼び出すと、削除待ち状態になります。 GL_LINK_STATUSを指定した場合、プログラムオブジェクトがglLinkProgramによりリンクに成功している場合にGL_TRUEが取得され、それ以外の場合にGL_FALSEが取得されます。GL_VALIDATE_STATUSには、DMPGL2.0ではGL_LINK_STATUSと同じ値が取得されます。 GL_INFO_LOG_LENGTHを指定した場合、常に0が取得されます。 GL_ATTACHED_SHADERSを指定した場合、プログラムにアタッチされているシェーダオブジェクトの個数が取得されます。 GL_ACTIVE_ATTRIBUTESを指定した場合、プログラムでアクティブになっている頂点属性の個数が取得されます。 GL_ACTIVE_ATTRIBUTE_MAX_LENGTHを指定した場合、プログラムでアクティブになっている頂点属性のうち最も長い名前の文字数が取得されます。 文字数には終端を示すNULLの数も含まれます。 GL_ACTIVE_UNIFORMSを指定した場合、プログラムでアクティブになっているユニフォームの個数が取得されます。 GL_ACTIVE_UNIFORM_MAX_LENGTHを指定した場合、プログラムでアクティブになっているユニフォームのうち最も長い名前の文字数が取得されます。 文字数には終端を示すNULLの数も含まれます。                 --></P><P>
56This function generates the following errors.
57<TABLE><TR><TH>GL_INVALID_ENUM</TH><TD>The <span class="argument">pname</span> argument was set to an invalid value.</TD></TR><TR><TH>GL_INVALID_VALUE</TH><TD>The <span class="argument">program</span> argument was set to an invalid value.</TD></TR></TABLE><!-- source                      pnameに不正な値を指定した場合エラーGL_INVALID_ENUMを生成します。 programに不正な値を指定した場合エラーGL_INVALID_VALUEを生成します。                 --></P></div>
58<h2>Revision History</h2>
59    <div class="section">
60      <dl class="history">
61        <dt>2010/01/07</dt>
62<dd>Initial version.<br />
63        </dd>
64      </dl>
65    </div>
66  <hr><p>CONFIDENTIAL</p></body>
67</html>