Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 1abc267

Browse files
Kangzkainino0x
andauthored
Add default for arguments of draw and drawIndirect. (gpuweb#632)
Co-authored-by: Kai Ninomiya <[email protected]>
1 parent 7e08b4b commit 1abc267

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

spec/index.bs

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2575,10 +2575,12 @@ interface mixin GPURenderEncoderBase {
25752575
void setIndexBuffer(GPUBuffer buffer, optional GPUSize64 offset = 0, optional GPUSize64 size = 0);
25762576
void setVertexBuffer(GPUIndex32 slot, GPUBuffer buffer, optional GPUSize64 offset = 0, optional GPUSize64 size = 0);
25772577

2578-
void draw(GPUSize32 vertexCount, GPUSize32 instanceCount,
2579-
GPUSize32 firstVertex, GPUSize32 firstInstance);
2580-
void drawIndexed(GPUSize32 indexCount, GPUSize32 instanceCount,
2581-
GPUSize32 firstIndex, GPUSignedOffset32 baseVertex, GPUSize32 firstInstance);
2578+
void draw(GPUSize32 vertexCount, optional GPUSize32 instanceCount = 1,
2579+
optional GPUSize32 firstVertex = 0, optional GPUSize32 firstInstance = 0);
2580+
void drawIndexed(GPUSize32 indexCount, optional GPUSize32 instanceCount = 1,
2581+
optional GPUSize32 firstIndex = 0,
2582+
optional GPUSignedOffset32 baseVertex = 0,
2583+
optional GPUSize32 firstInstance = 0);
25822584

25832585
void drawIndirect(GPUBuffer indirectBuffer, GPUSize64 indirectOffset);
25842586
void drawIndexedIndirect(GPUBuffer indirectBuffer, GPUSize64 indirectOffset);

0 commit comments

Comments
 (0)