From 1407c8fdef01ecd0ffb8a8bd46e7113f119b9fde Mon Sep 17 00:00:00 2001 From: julieng Date: Sat, 2 Oct 2021 17:20:24 +0200 Subject: convert content to md --- .../getattriblocation/index.md | 67 ++++++++-------------- 1 file changed, 24 insertions(+), 43 deletions(-) (limited to 'files/fr/web/api/webglrenderingcontext/getattriblocation') diff --git a/files/fr/web/api/webglrenderingcontext/getattriblocation/index.md b/files/fr/web/api/webglrenderingcontext/getattriblocation/index.md index d12d46f1c6..8242d0739b 100644 --- a/files/fr/web/api/webglrenderingcontext/getattriblocation/index.md +++ b/files/fr/web/api/webglrenderingcontext/getattriblocation/index.md @@ -9,61 +9,42 @@ tags: - WebGLRenderingContext translation_of: Web/API/WebGLRenderingContext/getAttribLocation --- -
{{APIRef("WebGL")}}
+{{APIRef("WebGL")}} -

La méthode WebGLRenderingContext.getAttribLocation() de l'API WebGL retourne l'emplacement d'une variable d'attribut dans le {{domxref("WebGLProgram")}} indiqué.

+La méthode **`WebGLRenderingContext.getAttribLocation()`** de l'[API WebGL](/fr-FR/docs/Web/API/WebGL_API) retourne l'emplacement d'une variable d'attribut dans le {{domxref("WebGLProgram")}} indiqué. -

Syntaxe

+## Syntaxe -
GLint gl.getAttribLocation(programme, nom);
-
+ GLint gl.getAttribLocation(programme, nom); -

Paramètres

+### Paramètres -
-
programme
-
Un {{domxref("WebGLProgram")}} contenant la variable d'attribut.
-
nom
-
Un {{domxref("DOMString")}} indiquant le nom de la variable d'attribut dont l'emplacement est à retourner.
-
+- programme + - : Un {{domxref("WebGLProgram")}} contenant la variable d'attribut. +- nom + - : Un {{domxref("DOMString")}} indiquant le nom de la variable d'attribut dont l'emplacement est à retourner. -

Valeur retournée

+### Valeur retournée -

Un nombre {{domxref("GLint")}} indiquant l'emplacement du nom de la variable si trouvé. Retourne -1 sinon.

+Un nombre {{domxref("GLint")}} indiquant l'emplacement du nom de la variable si trouvé. Retourne -1 sinon. -

Exemples

+## Exemples -
gl.getAttribLocation(programme, 'vColor');
-
+```js +gl.getAttribLocation(programme, 'vColor'); +``` -

Spécifications

+## Spécifications - - - - - - - - - - - - - - - - - - -
SpécificationStatutCommentaire
{{SpecName('WebGL', "#5.14.10", "getAttribLocation")}}{{Spec2('WebGL')}}Définition initiale.
{{SpecName('OpenGL ES 2.0', "glGetAttribLocation.xml", "glGetAttribLocation")}}{{Spec2('OpenGL ES 2.0')}}Page principale de l'API OpenGL.
+| Spécification | Statut | Commentaire | +| -------------------------------------------------------------------------------------------------------- | ------------------------------------ | -------------------------------- | +| {{SpecName('WebGL', "#5.14.10", "getAttribLocation")}} | {{Spec2('WebGL')}} | Définition initiale. | +| {{SpecName('OpenGL ES 2.0', "glGetAttribLocation.xml", "glGetAttribLocation")}} | {{Spec2('OpenGL ES 2.0')}} | Page principale de l'API OpenGL. | -

Compatibilité des navigateurs

+## Compatibilité des navigateurs -

{{Compat("api.WebGLRenderingContext.getAttribLocation")}}

+{{Compat("api.WebGLRenderingContext.getAttribLocation")}} -

Voir aussi

+## Voir aussi - +- {{domxref("WebGLRenderingContext.getUniformLocation()")}} -- cgit v1.2.3-54-g00ecf