MCPcopy Create free account
hub / github.com/microsoft/SandDance / getFramebuffer

Function getFramebuffer

docs/tests/v2/es6/js/sanddance.js:60433–60447  ·  view source on GitHub ↗
(gl, opts)

Source from the content-addressed store, hash-verified

60431}
60432
60433function getFramebuffer(gl, opts) {
60434 var id = opts.id,
60435 _opts$width2 = opts.width,
60436 width = _opts$width2 === void 0 ? 1 : _opts$width2,
60437 _opts$height2 = opts.height,
60438 height = _opts$height2 === void 0 ? 1 : _opts$height2;
60439 var texture = opts.texture || getFloatTexture(gl, opts);
60440 var fb = new _luma.Framebuffer(gl, {
60441 id: id,
60442 width: width,
60443 height: height,
60444 attachments: _defineProperty({}, _constants.default.COLOR_ATTACHMENT0, texture)
60445 });
60446 return fb;
60447}
60448
60449function getFloatArray(array, size) {
60450 var fillValue = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 0;

Callers

nothing calls this directly

Calls 2

getFloatTextureFunction · 0.85
_definePropertyFunction · 0.70

Tested by

no test coverage detected