MCPcopy Create free account
hub / github.com/ChartGPU/ChartGPU / getCanvasTexture

Function getCanvasTexture

src/core/GPUContext.ts:257–267  ·  view source on GitHub ↗
(context: GPUContextState)

Source from the content-addressed store, hash-verified

255 * ```
256 */
257export function getCanvasTexture(context: GPUContextState): GPUTexture {
258 if (!context.canvas) {
259 throw new Error('Canvas is not configured. Provide a canvas element when creating the context.');
260 }
261
262 if (!context.initialized || !context.canvasContext) {
263 throw new Error('GPUContext is not initialized. Call initializeGPUContext() first.');
264 }
265
266 return context.canvasContext.getCurrentTexture();
267}
268
269/**
270 * Clears the canvas to a solid color.

Callers 3

clearScreenFunction · 0.85
getCanvasTextureMethod · 0.85
renderFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected