WebGL2RenderingContext.beginTransformFeedback()
Baseline Widely available
This feature is well established and works across many devices and browser versions. It’s been available across browsers since September 2021.
WebGL 2 API 的 WebGL2RenderingContext.beginTransformFeedback()
方法开始一个变换回传(Transform Feedback)操作。
语法
void gl.beginTransformFeedback(primitiveMode);
参数
primitiveMode
-
A
GLenum
specifying the output type of the primitives that will be recorded into the buffer objects that are bound for transform feedback. 可能的值:gl.POINTS
gl.LINES
gl.TRIANGLES
返回值
无。
示例
js
var transformFeedback = gl.createTransformFeedback();
gl.bindTransformFeedback(gl.TRANSFORM_FEEDBACK, transformFeedback);
gl.beginTransformFeedback(gl.TRIANGLES);
gl.drawArrays(gl.TRIANGLES, 0, 3);
规范
Specification |
---|
WebGL 2.0 Specification # 3.7.15 |
浏览器兼容性
Report problems with this compatibility data on GitHubdesktop | mobile | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
beginTransformFeedback |
Legend
Tip: you can click/tap on a cell for more information.
- Full support
- Full support
The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.