-
Notifications
You must be signed in to change notification settings - Fork 45
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
Add partial documentation of WGPUSurface. #319
Conversation
Done are: - wgpuInstanceCreateSurface - wgpuSurfaceGetCapabilities And all the descriptors / enums referenced by them, as well as a more detailed article with pseudo-spec and examples. Remaining are: - wgpuSurfaceConfigure - wgpuSurfaceUnconfigure - wgpuSurfaceGetCurrentTexture - wgpuSurfacePresent
Can you add comments instead? I was going to push the rest of the doc now because I had time before your review. Sorry :X |
Or actually, let me rebase on top of your edits. |
PTAL, this should be the full API documentation, with some TODOs of things to resolve. |
Oops sorry, didn't realize you had more changes incoming! |
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.
LGTM but should probably have review from someone who knows it better than me
|
||
The behavior of `::wgpuSurfaceConfigure``(surface, config)` is: | ||
|
||
- If any of these validation steps fails, TODO: what should happen on failure? |
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.
Probably it should follow the JS API, which:
- throws a TypeError (= WGPUStatus_something probably?) for invalid texture formats
- generates a device error (on
config.device
) for other cases
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.
I'll leave this open for now as I think it requires more discussions than what we can do in this review.
Co-authored-by: Kai Ninomiya <[email protected]>
Co-authored-by: Kai Ninomiya <[email protected]>
Merging now, @kainino0x please ask wgpu folks to review it and let's file issue for any changes that we might need. |
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.
Minor remarks/typos, sorry I couldn't review earlier!
Done are:
And all the descriptors / enums referenced by them, as well as a more detailed article with pseudo-spec and examples.
Remaining are: