WebGL
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.POINTSgl.LINESgl.TRIANGLES
- : A GLenum specifying the output type of the primitives that will be recorded into the buffer objects that are bound for transform feedback. 可能的值:
返回值
无。
示例
var transformFeedback = gl.createTransformFeedback();
gl.bindTransformFeedback(gl.TRANSFORM_FEEDBACK, transformFeedback);
gl.beginTransformFeedback(gl.TRIANGLES);
gl.drawArrays(gl.TRIANGLES, 0, 3);
规范
浏览器兼容性
相关链接
- WebGLTransformFeedback
来源:MDN Web Docs / Mozilla 贡献者 · 作者与贡献记录 · CC BY-SA 2.5。离线整理了版式、链接和媒体显示。
