aboutsummaryrefslogtreecommitdiff
path: root/files/fr/web/api/webgltexture/index.html
blob: e6aa357f6d7a3a6c32e54083b6d1c8e459756a0c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
---
title: WebGLTexture
slug: Web/API/WebGLTexture
tags:
  - API
  - Reference
  - WebGL
translation_of: Web/API/WebGLTexture
---
<div>{{APIRef("WebGL")}}</div>

<p>L'interface WebGLTexture fait partie de l'<a href="/fr/docs/Web/API/WebGL_API">API WebGL</a> et représente un objet de texture opaque fournissant un stockage et un état pour les opérations de texturation.</p>

<h2 id="Description">Description</h2>

<p>L'objet WebGLTexture ne définit aucune méthode ou propriété propre, et son contenu n'est pas directement accessible. Lors du travail avec des objets WebGLTexture, les méthodes suivantes du {{domxref("WebGLRenderingContext")}} sont utiles :</p>

<ul>
 <li>{{domxref("WebGLRenderingContext.bindTexture()")}}</li>
 <li>{{domxref("WebGLRenderingContext.createTexture()")}}</li>
 <li>{{domxref("WebGLRenderingContext.deleteTexture()")}}</li>
 <li>{{domxref("WebGLRenderingContext.isTexture()")}}</li>
</ul>

<h2 id="Exemples">Exemples</h2>

<h3 id="Création_d'une_texture">Création d'une texture</h3>

<pre class="brush: js">var canevas = document.getElementById('canvas');
var gl = canevas.getContext('webgl');
var texture = gl.createTexture();
</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.9", "WebGLTexture")}}</td>
   <td>{{Spec2('WebGL')}}</td>
   <td>Définition initiale.</td>
  </tr>
 </tbody>
</table>

<h2 id="Compatibilité_des_navigateurs">Compatibilité des navigateurs</h2>

<p class="hidden">La table de compatibilité des navigateurs de cette page est générée à 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 de nous envoyer une "a pull request".</p>

<p>{{Compat("api.WebGLTexture")}}</p>

<h2 id="Voir_aussi">Voir aussi</h2>

<ul>
 <li>{{domxref("WebGLRenderingContext.bindTexture()")}}</li>
 <li>{{domxref("WebGLRenderingContext.createTexture()")}}</li>
 <li>{{domxref("WebGLRenderingContext.deleteTexture()")}}</li>
 <li>{{domxref("WebGLRenderingContext.isTexture()")}}</li>
 <li>{{domxref("WebGLRenderingContext.compressedTexImage2D()")}}</li>
 <li>{{domxref("WebGLRenderingContext.compressedTexSubImage2D()")}}</li>
 <li>{{domxref("WebGLRenderingContext.copyTexImage2D()")}}</li>
 <li>{{domxref("WebGLRenderingContext.copyTexSubImage2D()")}}</li>
 <li>{{domxref("WebGLRenderingContext.generateMipmap()")}}</li>
 <li>{{domxref("WebGLRenderingContext.getTexParameter()")}}</li>
 <li>{{domxref("WebGLRenderingContext.texImage2D()")}}</li>
 <li>{{domxref("WebGLRenderingContext.texSubImage2D()")}}</li>
 <li>{{domxref("WebGLRenderingContext.texParameterf()")}}</li>
 <li>{{domxref("WebGLRenderingContext.texParameteri()")}}</li>
</ul>