Search completed in 0.87 seconds.
9 results for "bufferSubData":
WebGLRenderingContext.bufferSubData() - Web APIs
the webglrenderingcontext.
buffersubdata() method of the webgl api updates a subset of a buffer object's data store.
... syntax // webgl1: void gl.
buffersubdata(target, offset, arraybuffer srcdata); void gl.
buffersubdata(target, offset, arraybufferview srcdata); // webgl2: void gl.
buffersubdata(target, dstbyteoffset, arraybufferview srcdata, srcoffset, length); parameters target a glenum specifying the binding point (target).
... examples using
buffersubdata var canvas = document.getelementbyid('canvas'); var gl = canvas.getcontext('webgl'); var buffer = gl.createbuffer(); gl.bindbuffer(gl.array_buffer, buffer); gl.bufferdata(gl.array_buffer, 1024, gl.static_draw); gl.
buffersubdata(gl.array_buffer, 512, data); specifications specification status comment webgl 1.0the definition of '
buffersubdata' in that specification.
...And 2 more matches
WebGL2RenderingContext.copyBufferSubData() - Web APIs
the webgl2renderingcontext.copy
buffersubdata() method of the webgl 2 api copies part of the data of a buffer to another buffer.
... syntax void gl.copy
buffersubdata(readtarget, writetarget, readoffset, writeoffset, size); parameters readtarget writetarget a glenum specifying the binding point (target) from whose data store should be read or written.
... gl.createbuffer(); var dstbuffer = gl.createbuffer(); var data = new float32array(vertices); var length = vertices.length * 4; gl.bindbuffer(gl.array_buffer, srcbuffer); gl.bufferdata(gl.array_buffer, data, gl.static_draw); gl.bindbuffer(gl.copy_read_buffer, srcbuffer); gl.bindbuffer(gl.array_buffer, dstbuffer); gl.bufferdata(gl.array_buffer, new float32array(length), gl.static_draw); gl.copy
buffersubdata(gl.copy_read_buffer, gl.array_buffer, 0, 0, length); specifications specification status comment webgl 2.0the definition of 'copy
buffersubdata' in that specification.
... opengl es 3.0the definition of 'glcopy
buffersubdata' in that specification.
WebGL2RenderingContext.getBufferSubData() - Web APIs
the webgl2renderingcontext.get
buffersubdata() method of the webgl 2 api reads data from a buffer binding point and writes them to an arraybuffer or sharedarraybuffer.
... syntax void gl.get
buffersubdata(target, srcbyteoffset, arraybufferview dstdata, optional dstoffset, optional length); parameters target a glenum specifying the binding point (target).
... examples var buffer = gl.createbuffer(); gl.bindbuffer(gl.array_buffer, buffer); gl.bufferdata(gl.array_buffer, new float32array(vertices), gl.static_draw); var arrbuffer = new arraybuffer(vertices.length * float32array.bytes_per_element); gl.get
buffersubdata(gl.array_buffer, 0, arrbuffer); specifications specification status comment webgl 2.0the definition of 'get
buffersubdata' in that specification.
Index - Web APIs
4620 webgl2renderingcontext.copy
buffersubdata() api, experimental, method, reference, webgl, webgl2 the webgl2renderingcontext.copy
buffersubdata() method of the webgl 2 api copies part of the data of a buffer to another buffer.
... 4642 webgl2renderingcontext.get
buffersubdata() api, experimental, method, reference, webgl, webgl2 the webgl2renderingcontext.get
buffersubdata() method of the webgl 2 api reads data from a buffer binding point and writes them to an arraybuffer or sharedarraybuffer.
... 4736 webglrenderingcontext.
buffersubdata() api, method, reference, webgl, webglrenderingcontext,
buffersubdata the webglrenderingcontext.
buffersubdata() method of the webgl api updates a subset of a buffer object's data store.
WebGL2RenderingContext - Web APIs
webgl2renderingcontext.
buffersubdata() updates a subset of a buffer object's data store.
... webgl2renderingcontext.copy
buffersubdata() copies part of the data of a buffer to another buffer.
... webgl2renderingcontext.get
buffersubdata() reads data from a buffer and writes them to an arraybuffer or sharedarraybuffer.
WebGL best practices - Web APIs
get
buffersubdata(): usual finish + round-trip.
...tasync(gl, sync, flags, interval_ms) { return new promise((resolve, reject) => { function test() { const res = gl.clientwaitsync(sync, flags, 0); if (res == gl.wait_failed) { reject(); return; } if (res == gl.timeout_expired) { settimeout(test, interval_ms); return; } resolve(); } test()); }); } async function get
buffersubdataasync( gl, target, buffer, srcbyteoffset, dstbuffer, /* optional */ dstoffset, /* optional */ length) { const sync = gl.fencesync(gl.sync_gpu_commands_complete, 0); gl.flush(); await clientwaitasync(gl, sync, 0, 10); gl.deletesync(sync); gl.bindbuffer(target, buffer); gl.get
buffersubdata(target, srcbyteoffset, dstbuffer, dstoffset, length); gl.bindbuffer(target, null); r...
...eturn dest; } async function readpixelsasync(gl, x, y, w, h, format, type, dest) { const buf = gl.createbuffer(); gl.bindbuffer(gl.pixel_pack_buffer, buf); gl.bufferdata(gl.pixel_pack_buffer, dest.bytelength, gl.stream_read); gl.readpixels(x, y, w, h, format, type, 0); gl.bindbuffer(gl.pixel_pack_buffer, null); await get
buffersubdataasync(gl, gl.pixel_pack_buffer, buf, 0, dest); gl.deletebuffer(buf); return dest; } canvas and webgl-related some tips are relevent to webgl, but deal with other apis.
WebGL constants - Web APIs
compressed_texture_formats 0x86a3 vendor 0x1f00 renderer 0x1f01 version 0x1f02 implementation_color_read_type 0x8b9a implementation_color_read_format 0x8b9b browser_default_webgl 0x9244 buffers constants passed to webglrenderingcontext.bufferdata(), webglrenderingcontext.
buffersubdata(), webglrenderingcontext.bindbuffer(), or webglrenderingcontext.getbufferparameter().
SharedArrayBuffer - JavaScript
apis which use sharedarraybuffer objects webglrenderingcontext.bufferdata() webglrenderingcontext.
buffersubdata() webgl2renderingcontext.get
buffersubdata() security requirements shared memory and high-resolution timers were effectively disabled at the start of 2018 in light of spectre.