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>glGetActiveAttrib</title> 8 </head> 9 <body> 10<h1>glGetActiveAttrib Function</h1> 11<h2>Syntax</h2> 12 <div class="section"> 13 <pre class="definition"> 14GL_APICALL void GL_APIENTRY glGetActiveAttrib( 15 GLuint program, 16 GLuint index, 17 GLsizei bufsize, 18 GLsizei * length, 19 GLint * size, 20 GLenum * type, 21 char * name 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>program</th> 38<td>Program object</td> 39 </tr> 40 <tr> 41<td>in</td> 42<th>index</th> 43<td>Vertex attribute index</td> 44 </tr> 45 <tr> 46<td>in</td> 47<th>bufsize</th> 48<td>Size of the buffer specified by <span class="argument">name</span></td> 49 </tr> 50 <tr> 51<td>out</td> 52<th>length</th> 53<td>Region storing the number of bytes in the string written to <span class="argument">name</span></td> 54 </tr> 55 <tr> 56<td>out</td> 57<th>size</th> 58<td>Region storing the vertex attribute size</td> 59 </tr> 60 <tr> 61<td>out</td> 62<th>type</th> 63<td>Region storing the vertex attribute type</td> 64 </tr> 65 <tr> 66<td>out</td> 67<th>name</th> 68<td>Array storing the vertex attribute name</td> 69 </tr> </table> 70 </div> 71<h2>Return Values</h2> 72<div class="section">No values are returned. </div> 73<h2>Description</h2> 74 <div class="section"> 75<p>Gets information about an active vertex attribute.</p><P> 76Set <span class="argument">program</span> to the program object. 77 </P><P> 78Set <span class="argument">index</span> to a value that is greater than or equal to 0 and is at least one less than the value that can be obtained from <code>glGetProgramiv</code> with <code>GL_ACTIVE_ATTRIBUTES</code> specified. 79 </P><P> 80Set <span class="argument">bufsize</span> to the size of the buffer specified in <span class="argument">name</span>. 81 </P><P> 82The name, size (number of components), and data type of the active vertex attribute specified by <span class="argument">index</span> in the object given by <span class="argument">program</span> are stored in <span class="argument">name</span>, <span class="argument">size</span>, and <span class="argument">type</span>, respectively. 83 </P><P> 84The <span class="argument">length</span> argument stores the size (in bytes) of the string saved in <span class="argument">name</span>. 85 </P><P> 86If the number of characters in the vertex attribute name exceeds <span class="argument">bufsize</span>, then <span class="argument">bufsize</span>-1 characters are copied into <span class="argument">name</span> and NULL is inserted at the end. 87 </P><P> 88This function generates the following errors. 89<TABLE><TR><TH>GL_INVALID_VALUE</TH><TD>The <span class="argument">program</span> or <span class="argument">index</span> argument was set to an invalid value, or <span class="argument">bufsize</span> was set to a negative value.</TD></TR><TR><TH>GL_INVALID_OPERATION</TH><TD>The <span class="argument">program</span> argument is not linked correctly.</TD></TR></TABLE><!-- source program、indexに不正な値を指定した場合、bufsizeに負の値を指定した場合エラーGL_INVALID_VALUEを生成します。 programが正しくリンクされていない場合エラーGL_INVALID_OPERATIONを生成します。 --></P></div> 90<h2>Revision History</h2> 91 <div class="section"> 92 <dl class="history"> 93 <dt>2010/01/07</dt> 94<dd>Initial version.<br /> 95 </dd> 96 </dl> 97 </div> 98 <hr><p>CONFIDENTIAL</p></body> 99</html>