"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.getDrawParams = getDrawParams;
exports.freeDrawParams = freeDrawParams;
const DrawCommand_1 = require("./DrawCommand");
;
let scratchDrawParams;
/** @internal */
function getDrawParams(target, geometry) {
    if (undefined === scratchDrawParams) {
        scratchDrawParams = {
            progParams: new DrawCommand_1.ShaderProgramParams(),
            drawParams: new DrawCommand_1.DrawParams(),
        };
    }
    scratchDrawParams.progParams.init(target);
    scratchDrawParams.drawParams.init(scratchDrawParams.progParams, geometry);
    return scratchDrawParams.drawParams;
}
/** @internal */
function freeDrawParams() {
    scratchDrawParams = undefined;
}
//# sourceMappingURL=ScratchDrawParams.js.map