-
Notifications
You must be signed in to change notification settings - Fork 8.1k
/
index.md
50 lines (33 loc) · 1.01 KB
/
index.md
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
---
title: WebGLRenderingContext.createFramebuffer()
short-title: createFramebuffer()
slug: Web/API/WebGLRenderingContext/createFramebuffer
---
{{APIRef("WebGL")}}
[WebGL API](/ja/docs/Web/API/WebGL_API) の **`WebGLRenderingContext.createFramebuffer()`** メソッドは、
{{domxref("WebGLFramebuffer")}}
を作成し、初期化します。
## 構文
```js-nolint
createFramebuffer()
```
### 引数
なし。
### 返値
{{domxref("WebGLFramebuffer")}} オブジェクト。
## 例
### フレームバッファーを作成する
```js
const canvas = document.getElementById("canvas");
const gl = canvas.getContext("webgl");
const framebuffer = gl.createFramebuffer();
```
## 仕様書
{{Specifications}}
## ブラウザーの互換性
{{Compat}}
## 関連情報
- {{domxref("WebGLRenderingContext.bindFramebuffer()")}}
- {{domxref("WebGLRenderingContext.deleteFramebuffer()")}}
- {{domxref("WebGLRenderingContext.isFramebuffer()")}}
- 他のバッファ: {{domxref("WebGLBuffer")}}, {{domxref("WebGLRenderbuffer")}}