@babylonjs/core
Version:
Getting started? Play directly with the Babylon.js API using our [playground](https://playground.babylonjs.com/). It also contains a lot of samples to learn how to use it.
24 lines • 782 B
JavaScript
/** This file must only contain pure code and pure imports */
import { ThinEngine } from "./thinEngine.pure.js";
let _Registered = false;
/**
* Registers the WebGL scissor implementation on ThinEngine.
* Safe to call multiple times; only the first call has an effect.
*/
export function RegisterThinEngineScissor() {
if (_Registered) {
return;
}
_Registered = true;
ThinEngine.prototype.enableScissor = function (x, y, width, height) {
const gl = this._gl;
// Change state
gl.enable(gl.SCISSOR_TEST);
gl.scissor(x, y, width, height);
};
ThinEngine.prototype.disableScissor = function () {
const gl = this._gl;
gl.disable(gl.SCISSOR_TEST);
};
}
//# sourceMappingURL=thinEngine.scissor.pure.js.map