blob: f0d72924e890b1c46d1c88be048fa9f12abf1db6 (
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
|
---
title: WebGLRenderingContext.isBuffer()
slug: Web/API/WebGLRenderingContext/isBuffer
tags:
- API
- Méthode
- WebGL
- WebGLRenderingContext
translation_of: Web/API/WebGLRenderingContext/isBuffer
---
{{APIRef("WebGL")}}
La méthode **`WebGLRenderingContext.isBuffer()`** de l'[API WebGL](/fr-FR/docs/Web/API/WebGL_API) renvoie `true` si le {{domxref ("WebGLBuffer")}} passé est valide et `false` dans le cas contraire.
## Syntaxe
GLboolean gl.isBuffer(tampon);
### Paramètres
- tampon
- : Un {{domxref("WebGLBuffer")}} à vérifier.
### Valeur retournée
Un {{domxref("GLboolean")}} indiquant si le tampon est ou non valide.
## Exemples
### Création d'un tampon
```js
var canevas = document.getElementById('canevas');
var gl = canevas.getContext('webgl');
var tampon = gl.createBuffer();
gl.isBuffer(tampon);
```
## Spécifications
<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.14.5", "isBuffer")}}</td>
<td>{{Spec2('WebGL')}}</td>
<td>Définition initiale.</td>
</tr>
<tr>
<td>
{{SpecName('OpenGL ES 2.0', "glIsBuffer.xml", "glIsBuffer")}}
</td>
<td>{{Spec2('OpenGL ES 2.0')}}</td>
<td><p>Page man de l’API OpenGL.</p></td>
</tr>
</tbody>
</table>
## Compatibilité des navigateurs
{{Compat("api.WebGLRenderingContext.isBuffer")}}
## Voir aussi
- {{domxref("WebGLRenderingContext.bindBuffer()")}}
- {{domxref("WebGLRenderingContext.createBuffer()")}}
- {{domxref("WebGLRenderingContext.deleteBuffer()")}}
- Autres tampons : {{domxref("WebGLFramebuffer")}}, {{domxref("WebGLRenderbuffer")}}
|