-
-
Notifications
You must be signed in to change notification settings - Fork 10
feat: Introduce Index buffers and improve buffer UX #1340
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
pkg.pr.new packages
benchmark commit |
c9c3e0a
to
ce93b12
Compare
Also update resolveData to throw for u16 type in WGSL. Remove unused test buffer in cubemap-reflection example.
- Add a simple square example with color controls - Implement .withIndexBuffer and .drawIndexed for render pipelines - Allow u16 arrays as index buffers; improve type safety for buffer schemas - Update alignment and size maps to include u16 - Refactor HasNestedType utility and enforce buffer schema constraints
ce93b12
to
741e69d
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesome addition! 🚀
const pass = this.setupRenderPass(); | ||
const { branch } = this[$internal].core.options; | ||
const internals = this[$internal]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Small suggestion
const pass = this.setupRenderPass(); | |
const { branch } = this[$internal].core.options; | |
const internals = this[$internal]; | |
const internals = this[$internal]; | |
const pass = this.setupRenderPass(); | |
const { branch } = internals.core.options; |
color: readonly [number, number, number], | ||
position: keyof typeof colors, | ||
): void { | ||
colors[position] = d.vec4f(color[0], color[1], color[2], 1); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
colors[position] = d.vec4f(color[0], color[1], color[2], 1); | |
colors[position] = d.vec4f(...color, 1); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Another step closer to full coverage!
@@ -357,6 +362,17 @@ export interface RenderPass { | |||
): undefined; | |||
} | |||
|
|||
type ValidateSchema<TData extends AnyData> = HasNestedType< |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What was our consensus on returning errors in types? Are we going to keep doing this or is this a special case?
Also adds a very simple square example that uses the experimental APIs and demonstrates the index buffer :)

closes #863