Skip to content

Commit 43f4a05

Browse files
committed
feat: topology option
1 parent 9440d93 commit 43f4a05

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

src/GpuWrapper.ts

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,9 @@ export interface GpuWrapperInfo<T extends Layout> {
1616
format?: GPUTextureFormat,
1717
vertShader?: string,
1818
fragShader?: string,
19-
layout?: T,
20-
}
21-
export interface GpuWrapperInfo<T extends Layout> {
22-
getTexture?(): GPUTexture,
23-
format?: GPUTextureFormat,
2419
compShader?: string,
2520
layout?: T,
21+
topology?: GPUPrimitiveTopology,
2622
}
2723

2824
export class GpuWrapper<T extends Layout> {
@@ -43,6 +39,7 @@ export class GpuWrapper<T extends Layout> {
4339
fragShader,
4440
compShader,
4541
layout,
42+
topology,
4643
}: GpuWrapperInfo<T>,
4744
) {
4845
this.root = root
@@ -104,7 +101,7 @@ export class GpuWrapper<T extends Layout> {
104101
targets: [{ format: this.format }],
105102
},
106103
primitive: {
107-
topology: "triangle-strip",
104+
topology: topology || "triangle-strip",
108105
},
109106
})
110107
}

0 commit comments

Comments
 (0)