-
Notifications
You must be signed in to change notification settings - Fork 2.2k
docs(core) replace glOptions with deviceProps
#8945
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
Conversation
Signed-off-by: Chris Gervang <[email protected]>
| parameters: {}, | ||
| parent: null, | ||
| device: null, | ||
| deviceProps: {type: 'webgl'} as DeviceProps, |
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 will not provide any type hint for WebGL context options. Should be something like this?
DeviceProps & (
({type: 'webgl'} & WebGLContextAttributes)
| {type?: 'webgpu'}
)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.
You may want to specify preserveDrawingBuffer even when omitting Device type or using type: 'best-available'.
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.
Is type optional? What happens when someone doesn't specify the type on deviceProps, and let's deck define the device?
What will luma.createDevice do by default in deck? I think deck only registers a WebGLDevice in this logic but it's just a little unclear reading the code whether type is required, and if not, what that implies in deck?
Co-authored-by: Xiaoji Chen <[email protected]>
Co-authored-by: Xiaoji Chen <[email protected]>
| controller={true} | ||
| onWebGLInitialized={setGLContext} | ||
| glOptions={{stencil: true}} | ||
| deviceProps={{type: 'webgl', stencil: true}} |
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.
User's can forget to add type: 'webgl'. Any problem with deck adding it by default if the user hasn't specified? Also technically if the user provides type here it's a luma CreateDeviceProps instead of DeviceProps
Signed-off-by: Chris Gervang <[email protected]>
|
@ibgreen where did we land on this API in luma? I can update this to reflect the latest for 9.1 |
Just updated the PR to reflect the latest. Another noteworthy change that is coming is that luma,gl device now takes While this fiddling with device creation props does take effort and may seem like bikeshedding, the exciting goal here is that on WebGPU we will eventually be able to make deck.gl work with multiple canvases using a single device! So these API changes are worthwhile (we are not just rearranging the deck chairs, so to speak). |
| @@ -0,0 +1,48 @@ | |||
| import { | |||
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.
Hey @ibgreen I think a bunch of files in /typed accidentally made it in here. Was that intentional?
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.
Hey @ibgreen I think a bunch of files in
/typedaccidentally made it in here. Was that intentional?
Oh no, what a mess...
We need to revert and reapply;
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'm about to push up a revert
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.
Closes #8896
Background
glOptionswas removed in v9 and replaced bydeviceProps.Change List
glOptions(this has not been functional since v9)deviceanddevicePropsdeviceProps: WebGLDeviceProps | WebGPUDeviceProps(need to update luma)