diff options
author | Peter Bengtsson <mail@peterbe.com> | 2020-12-08 14:40:17 -0500 |
---|---|---|
committer | Peter Bengtsson <mail@peterbe.com> | 2020-12-08 14:40:17 -0500 |
commit | 33058f2b292b3a581333bdfb21b8f671898c5060 (patch) | |
tree | 51c3e392513ec574331b2d3f85c394445ea803c6 /files/fr/web/api/webglrenderingcontext/getattriblocation | |
parent | 8b66d724f7caf0157093fb09cfec8fbd0c6ad50a (diff) | |
download | translated-content-33058f2b292b3a581333bdfb21b8f671898c5060.tar.gz translated-content-33058f2b292b3a581333bdfb21b8f671898c5060.tar.bz2 translated-content-33058f2b292b3a581333bdfb21b8f671898c5060.zip |
initial commit
Diffstat (limited to 'files/fr/web/api/webglrenderingcontext/getattriblocation')
-rw-r--r-- | files/fr/web/api/webglrenderingcontext/getattriblocation/index.html | 71 |
1 files changed, 71 insertions, 0 deletions
diff --git a/files/fr/web/api/webglrenderingcontext/getattriblocation/index.html b/files/fr/web/api/webglrenderingcontext/getattriblocation/index.html new file mode 100644 index 0000000000..a5977cc61f --- /dev/null +++ b/files/fr/web/api/webglrenderingcontext/getattriblocation/index.html @@ -0,0 +1,71 @@ +--- +title: WebGLRenderingContext.getAttribLocation() +slug: Web/API/WebGLRenderingContext/getAttribLocation +tags: + - API + - Méthode + - Reference + - WebGL + - WebGLRenderingContext +translation_of: Web/API/WebGLRenderingContext/getAttribLocation +--- +<div>{{APIRef("WebGL")}}</div> + +<p>La méthode <strong><code>WebGLRenderingContext.getAttribLocation()</code></strong> de l'<a href="/fr-FR/docs/Web/API/WebGL_API">API WebGL</a> retourne l'emplacement d'une variable d'attribut dans le {{domxref("WebGLProgram")}} indiqué.</p> + +<h2 id="Syntaxe">Syntaxe</h2> + +<pre class="syntaxbox">GLint <var>gl</var>.getAttribLocation(<var>programme</var>, <var>nom</var>); +</pre> + +<h3 id="Paramètres">Paramètres</h3> + +<dl> + <dt>programme</dt> + <dd>Un {{domxref("WebGLProgram")}} contenant la variable d'attribut.</dd> + <dt>nom</dt> + <dd>Un {{domxref("DOMString")}} indiquant le nom de la variable d'attribut dont l'emplacement est à retourner.</dd> +</dl> + +<h3 id="Valeur_retournée">Valeur retournée</h3> + +<p>Un nombre {{domxref("GLint")}} indiquant l'emplacement du nom de la variable si trouvé. Retourne -1 sinon.</p> + +<h2 id="Exemples">Exemples</h2> + +<pre class="brush: js">gl.getAttribLocation(programme, 'vColor'); +</pre> + +<h2 id="Spécifications">Spécifications</h2> + +<table class="standard-table"> + <tbody> + <tr> + <th scope="col">Spécification</th> + <th scope="col">Statut</th> + <th scope="col">Commentaire</th> + </tr> + <tr> + <td>{{SpecName('WebGL', "#5.14.10", "getAttribLocation")}}</td> + <td>{{Spec2('WebGL')}}</td> + <td>Définition initiale.</td> + </tr> + <tr> + <td>{{SpecName('OpenGL ES 2.0', "glGetAttribLocation.xml", "glGetAttribLocation")}}</td> + <td>{{Spec2('OpenGL ES 2.0')}}</td> + <td>Page principale de l'API OpenGL.</td> + </tr> + </tbody> +</table> + +<h2 id="Compatibilité_des_navigateurs">Compatibilité des navigateurs</h2> + +<p class="hidden">Le tableau de compatibilité de cette page est généré à partir de données structurées. Si vous souhaitez contribuer aux données, merci de regarder <a href="https://github.com/mdn/browser-compat-data">https://github.com/mdn/browser-compat-data</a> et envoyez-nous une pull request.</p> + +<p>{{Compat("api.WebGLRenderingContext.getAttribLocation")}}</p> + +<h2 id="Voir_aussi">Voir aussi</h2> + +<ul> + <li>{{domxref("WebGLRenderingContext.getUniformLocation()")}}</li> +</ul> |