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