-
Notifications
You must be signed in to change notification settings - Fork 670
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
attribute USVString WebGLObject.label, application-provided. #3637
Conversation
https://www.w3.org/TR/webgpu/#gpuobjectbase interface mixin GPUObjectBase {
attribute USVString label;
}; |
The difference between WebGPU's label and WebGL is that, AFAIK, WebGPU always returns an object. WebGL does not
WebGPU doesn't have this issue More in the spirit of WebGL would be Sure, the user can check for null though. |
I strongly prefer the ergonomics of .label, and would rather champion infallible allocations instead of reduced ergonomics. |
In the spirit of the fact that WebGL is supposed to make porting OpenGLES code easier, isn't Of course it's doesn't have to be either/or but still. |
I believe my proposal is the best way forward for the most users. |
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.
Looks good, thanks.
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.
This direction sounds good. While it's a different API style than other WebGL extensions, it's expected that this would be implementable/supportable at the native level pretty much ubiquitously.
This is similar to WebGPU's
GPUObjectBase.label
.