From c05efa8d7ae464235cf83d7c0956e42dc6974103 Mon Sep 17 00:00:00 2001 From: julieng Date: Sat, 2 Oct 2021 17:20:14 +0200 Subject: move *.html to *.md --- .../webglrenderingcontext/createtexture/index.md | 76 ++++++++++++++++++++++ 1 file changed, 76 insertions(+) create mode 100644 files/fr/web/api/webglrenderingcontext/createtexture/index.md (limited to 'files/fr/web/api/webglrenderingcontext/createtexture/index.md') diff --git a/files/fr/web/api/webglrenderingcontext/createtexture/index.md b/files/fr/web/api/webglrenderingcontext/createtexture/index.md new file mode 100644 index 0000000000..2ac9c1fd62 --- /dev/null +++ b/files/fr/web/api/webglrenderingcontext/createtexture/index.md @@ -0,0 +1,76 @@ +--- +title: WebGLRenderingContext.createTexture() +slug: Web/API/WebGLRenderingContext/createTexture +tags: + - API + - Méthode + - Reference + - Textures + - WebGL + - WebGLRenderingContext +translation_of: Web/API/WebGLRenderingContext/createTexture +--- +
{{APIRef("WebGL")}}
+ +

La méthode WebGLRenderingContext.createTexture() de l'API WebGL crée et initialise un objet {{domxref("WebGLTexture")}}.

+ +

Syntaxe

+ +
WebGLTexture gl.createTexture();
+
+ +

Paramètres

+ +

Aucun.

+ +

Valeur retournée

+ +

Un objet {{domxref("WebGLTexture")}} auquel des images peuvent être liées.

+ +

Exemples

+ +

Voir aussi le tutoriel WebGL sur l'Utilisation de textures en WebGL.

+ +

Création d'une texture

+ +
var canevas = document.getElementById('canevas');
+var gl = canevas.getContext('webgl');
+var texture = gl.createTexture();
+
+ +

Spécifications

+ + + + + + + + + + + + + + + + + + + +
SpécificationStatutCommentaire
{{SpecName('WebGL', "#5.14.8", "createTexture")}}{{Spec2('WebGL')}} +

Définition initiale.

+
{{SpecName('OpenGL ES 2.0', "glGenTextures.xml", "glGenTextures")}}{{Spec2('OpenGL ES 2.0')}}Page man de l’API OpenGL (similaire).
+ +

Compatibilité des navigateurs

+ +

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

+ +

Voir aussi

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