UNPKG

@vrame/xeokit-sdk

Version:

3D BIM IFC Viewer SDK for AEC engineering applications. Open Source JavaScript Toolkit based on pure WebGL for top performance, real-world coordinates and full double precision

26 lines (21 loc) 639 B
import {VBORenderer} from "./../../../VBORenderer.js"; /** * @private */ export class VBOInstancingLinesRenderer extends VBORenderer { constructor(scene, withSAO) { super(scene, withSAO, {instancing: true}); } _draw(drawCfg) { const {gl} = this._scene.canvas; const { state, frameCtx, incrementDrawState, } = drawCfg; gl.drawElementsInstanced(gl.LINES, state.indicesBuf.numItems, state.indicesBuf.itemType, 0, state.numInstances); if (incrementDrawState) { frameCtx.drawElements++; } } }