(context: GPUContextState)
| 255 | * ``` |
| 256 | */ |
| 257 | export 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. |
no outgoing calls
no test coverage detected