From 33058f2b292b3a581333bdfb21b8f671898c5060 Mon Sep 17 00:00:00 2001 From: Peter Bengtsson Date: Tue, 8 Dec 2020 14:40:17 -0500 Subject: initial commit --- .../getattriblocation/index.html | 71 ++++++++++++++++++++++ 1 file changed, 71 insertions(+) create mode 100644 files/fr/web/api/webglrenderingcontext/getattriblocation/index.html (limited to 'files/fr/web/api/webglrenderingcontext/getattriblocation') 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 +--- +
{{APIRef("WebGL")}}
+ +

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

+ +

Syntaxe

+ +
GLint gl.getAttribLocation(programme, nom);
+
+ +

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.
+
+ +

Valeur retournée

+ +

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

+ +

Exemples

+ +
gl.getAttribLocation(programme, 'vColor');
+
+ +

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.
+ +

Compatibilité des navigateurs

+ + + +

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

+ +

Voir aussi

+ + -- cgit v1.2.3-54-g00ecf