MCPcopy Index your code
hub / github.com/ChartGPU/ChartGPU / render

Function render

src/renderers/createAnnotationMarkerRenderer.ts:249–267  ·  view source on GitHub ↗
(passEncoder, firstInstance = 0, requestedCount)

Source from the content-addressed store, hash-verified

247 };
248
249 const render: AnnotationMarkerRenderer['render'] = (passEncoder, firstInstance = 0, requestedCount) => {
250 assertNotDisposed();
251 if (!instanceBuffer || instanceCount === 0) return;
252
253 const first = Number.isFinite(firstInstance) ? Math.max(0, Math.floor(firstInstance)) : 0;
254 const available = Math.max(0, instanceCount - first);
255 const count =
256 requestedCount == null
257 ? available
258 : Number.isFinite(requestedCount)
259 ? Math.max(0, Math.min(available, Math.floor(requestedCount)))
260 : available;
261 if (count === 0) return;
262
263 passEncoder.setPipeline(pipeline);
264 passEncoder.setBindGroup(0, bindGroup);
265 passEncoder.setVertexBuffer(0, instanceBuffer);
266 passEncoder.draw(6, count, 0, first);
267 };
268
269 const dispose: AnnotationMarkerRenderer['dispose'] = () => {
270 if (disposed) return;

Callers

nothing calls this directly

Calls 1

assertNotDisposedFunction · 0.70

Tested by

no test coverage detected