MCPcopy Index your code
hub / github.com/microsoft/SandDance / resizeGLContext

Function resizeGLContext

docs/app/js/sanddance-app.js:60394–60403  ·  view source on GitHub ↗
(gl)

Source from the content-addressed store, hash-verified

60392 };
60393}
60394function resizeGLContext(gl) {
60395 var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
60396 if (gl.canvas) {
60397 var devicePixelRatio = (0, _utils.getDevicePixelRatio)(options.useDevicePixels);
60398 setDevicePixelRatio(gl, devicePixelRatio, options);
60399 return;
60400 }
60401 var ext = gl.getExtension("STACKGL_resize_drawingbuffer");
60402 if (ext && "width" in options && "height" in options) ext.resize(options.width, options.height);
60403}
60404function createBrowserContext(canvas, options) {
60405 var onError = options.onError;
60406 var onCreateError = function onCreateError(error) {

Callers

nothing calls this directly

Calls 2

setDevicePixelRatioFunction · 0.70
resizeMethod · 0.45

Tested by

no test coverage detected