File tree Expand file tree Collapse file tree 2 files changed +3
-23
lines changed
packages/typegpu/src/core/root Expand file tree Collapse file tree 2 files changed +3
-23
lines changed Original file line number Diff line number Diff line change @@ -444,9 +444,9 @@ class TgpuRootImpl extends WithBindingImpl
444444 ) ;
445445 }
446446 context . configure ( {
447- device : this . device ,
448- format : navigator . gpu . getPreferredCanvasFormat ( ) ,
449447 ...options ,
448+ device : this . device ,
449+ format : options . format ?? navigator . gpu . getPreferredCanvasFormat ( ) ,
450450 } ) ;
451451 return context ;
452452 }
Original file line number Diff line number Diff line change @@ -578,27 +578,7 @@ export type ConfigureContextOptions = {
578578 * Defaults to `navigator.gpu.getPreferredCanvasFormat()` if not provided.
579579 */
580580 format ?: GPUTextureFormat ;
581- /**
582- * Passed to `context.configure()`.
583- */
584- usage ?: GPUTextureUsageFlags ;
585- /**
586- * Passed to `context.configure()`.
587- */
588- viewFormats ?: Iterable < GPUTextureFormat > ;
589- /**
590- * Passed to `context.configure()`.
591- */
592- colorSpace ?: PredefinedColorSpace ;
593- /**
594- * Passed to `context.configure()`.
595- */
596- toneMapping ?: GPUCanvasToneMapping ;
597- /**
598- * Passed to `context.configure()`.
599- */
600- alphaMode ?: GPUCanvasAlphaMode ;
601- } ;
581+ } & Omit < GPUCanvasConfiguration , 'device' | 'format' > ;
602582
603583export interface TgpuRoot extends Unwrapper {
604584 [ $internal ] : {
You can’t perform that action at this time.
0 commit comments