From 33058f2b292b3a581333bdfb21b8f671898c5060 Mon Sep 17 00:00:00 2001 From: Peter Bengtsson Date: Tue, 8 Dec 2020 14:40:17 -0500 Subject: initial commit --- .../webglrenderingcontext/uniformmatrix/index.html | 90 ++++++++++++++++++++++ 1 file changed, 90 insertions(+) create mode 100644 files/fr/web/api/webglrenderingcontext/uniformmatrix/index.html (limited to 'files/fr/web/api/webglrenderingcontext/uniformmatrix/index.html') diff --git a/files/fr/web/api/webglrenderingcontext/uniformmatrix/index.html b/files/fr/web/api/webglrenderingcontext/uniformmatrix/index.html new file mode 100644 index 0000000000..ec173f0e68 --- /dev/null +++ b/files/fr/web/api/webglrenderingcontext/uniformmatrix/index.html @@ -0,0 +1,90 @@ +--- +title: 'WebGLRenderingContext.uniformMatrix[234]fv()' +slug: Web/API/WebGLRenderingContext/uniformMatrix +tags: + - API + - Matrice + - Reference + - Uniforms + - Variables Uniform + - WebGL + - WebGLAPI + - WebGLRenderingContext + - matrices + - uniformMatrix2fv + - uniformMatrix3fv + - uniformMatrix4fv +translation_of: Web/API/WebGLRenderingContext/uniformMatrix +--- +
{{APIRef("WebGL")}}
+ +

Les méthodes WebGLRenderingContext.uniformMatrix[234]fv() de l'API WebGL définissent des valeurs matricielles pour les variables uniform.

+ +

Les trois versions de cette méthode (uniformMatrix2fv(), uniformMatrix3fv() et unifomMatrix4fv()) prennent comme valeur d'entrée des vecteurs à 2, 3 et 4 composantes, respectivement.

+ +

Syntaxe

+ +
WebGLRenderingContext.uniformMatrix2fv(emplacement, transposer, valeur);
+WebGLRenderingContext.uniformMatrix3fv(emplacement, transposer, valeur);
+WebGLRenderingContext.uniformMatrix4fv(emplacement, transposer, valeur);
+
+ +

Paramètres

+ +
+
emplacement
+
Un objet {{domxref("WebGLUniformLocation")}} contenant l'emplacement de l'attribut uniform à modifier. L'emplacement est obtenu en utilisant {{domxref("WebGLRenderingContext.getAttribLocation", "getAttribLocation()")}}.
+
transposer
+
Un {{domxref("GLboolean")}} indiquant si la matrice doit être transposée. Doit être false.
+
valeur
+
+

Un {{jsxref("Float32Array")}} ou une suite de valeurs GLfloat.

+
+
+ +

Valeur retournée

+ +

undefined

+ +

Exemples

+ +
gl.uniformMatrix2fv(loc, false, [2.1, 2.2]);
+ +

Spécifications

+ + + + + + + + + + + + + + + + + + + +
SpécificationStatutCommentaire
{{SpecName('WebGL', "#5.14.10", "uniformMatrix")}}{{Spec2('WebGL')}} +

Définition initiale.

+
{{SpecName('OpenGL ES 2.0', "glUniform.xml", "glUniform")}}{{Spec2('OpenGL ES 2.0')}} +

Page man de l’API OpenGL.

+
+ +

Compatibilité des navigateurs

+ + + +

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

+ +

Voir aussi

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