Baseline Widely available
ebGLRenderingContext.bindBuffer()
меÑод WebGL API ÑвÑзÑÐ²Ð°ÐµÑ WebGLBuffer
c ÑоÑкой ÑвÑзÑваниÑ(ÐÑÑибÑÑ ÑегиÑÑÑом).
void gl.bindBuffer(target, buffer);ÐаÑамеÑÑÑ
GLenum
опÑеделÑÐµÑ ÑоÑÐºÑ ÑвÑзÑÐ²Ð°Ð½Ð¸Ñ (target). ÐозможнÑе знаÑениÑ:
gl.ARRAY_BUFFER
: ÐÑÑÐµÑ ÑодеÑжаÑий веÑÑиннÑе аÑÑибÑÑÑ, Ñакие как кооÑдинаÑÑ, ÑекÑÑÑÑнÑе кооÑдинаÑÑ(UV) или ÑÐ²ÐµÑ Ð²ÐµÑÑинÑ.gl.ELEMENT_ARRAY_BUFFER
: ÐÑÑÐµÑ Ð¸ÑполÑзÑÑÑий Ð´Ð»Ñ Ð¸Ð½Ð´ÐµÐºÑиÑÐ¾Ð²Ð°Ð½Ð¸Ñ ÑлеменÑов.gl.COPY_READ_BUFFER
: Buffer for copying from one buffer object to another.gl.COPY_WRITE_BUFFER
: Buffer for copying from one buffer object to another.gl.TRANSFORM_FEEDBACK_BUFFER
: Buffer for transform feedback operations.gl.UNIFORM_BUFFER
: Buffer used for storing uniform blocks.gl.PIXEL_PACK_BUFFER
: Buffer used for pixel transfer operations.gl.PIXEL_UNPACK_BUFFER
: Buffer used for pixel transfer operations.WebGLBuffer
Ñ ÐºÐ¾ÑоÑÑм оÑÑÑеÑÑвлÑеÑÑÑ ÑвÑзÑвание.
ÐеÑ.
ExceptionsOnly one target can be bound to a given WebGLBuffer
. An attempt to bind the buffer to another target will throw an INVALID_OPERATION
error and the current buffer binding will remain the same.
var canvas = document.getElementById("canvas");
var gl = canvas.getContext("webgl");
var buffer = gl.createBuffer();
gl.bindBuffer(gl.ARRAY_BUFFER, buffer);
Getting current bindings
To check the current buffer bindings, query the ARRAY_BUFFER_BINDING
and ELEMENT_ARRAY_BUFFER_BINDING
constants.
gl.getParameter(gl.ARRAY_BUFFER_BINDING);
gl.getParameter(gl.ELEMENT_ARRAY_BUFFER_BINDING);
СпеÑиÑикаÑии СовмеÑÑимоÑÑÑ Ñ Ð±ÑаÑзеÑами СмоÑÑиÑе Ñакже
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4