You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
WebGL context. Will be auto-created if not supplied.
57
+
Options used for creating a new luma.gl GPU [Device](https://luma.gl/docs/api-reference/core/device).
54
58
55
-
#### `glOptions` (object) {#gloptions}
59
+
Note that when using WebGL, `props.deviceProps.webgl` can be used to specify [WebGL context attributes](https://developer.mozilla.org/en-US/docs/Web/API/HTMLCanvasElement/getContext#contextattributes).
60
+
61
+
#### `gl` (WebGLContext) {#gl}
56
62
57
-
Additional options used when creating the WebGLContext. See [WebGL context attributes](https://developer.mozilla.org/en-US/docs/Web/API/HTMLCanvasElement/getContext).
63
+
WebGL context to use. This prop is deprecated and replaced by `device`.
58
64
59
65
#### `id` (string) {#id}
60
66
@@ -434,7 +440,7 @@ Called once the [Device](https://luma.gl/docs/api-reference/core/device) context
434
440
435
441
Receives arguments:
436
442
437
-
* `device` (Device) - a `WEBGLDevice` or `WebGPUDevice`.
443
+
* `device` (Device) - a `WebGLDevice` or `WebGPUDevice`.
Copy file name to clipboardExpand all lines: docs/upgrade-guide.md
+6-4Lines changed: 6 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -50,11 +50,13 @@ The biggest changes in deck.gl v9 are due to the upgrade to the luma.gl v9 API.
50
50
51
51
Quick summary:
52
52
53
-
- All references to `gl: WebGLRenderingContext` should be replaced with `device`: [Device](https://luma.gl/docs/api-reference/core/device).
54
-
- Layer props `parameters` and `textureParameters` no longer use WebGL constants, but instead use (WebGPU style) [string constants](https://luma.gl/docs/api-reference/core/parameters/).
55
-
- Deck class prop `onWebGLInitialized` is now `onDeviceInitialized`.
53
+
-`DeckProps.gl (WebGLRenderingContext)` should be replaced with `device`: [Device](https://luma.gl/docs/api-reference/core/device).
54
+
-`DeckProps.glOptions (WebGLContextAttributes)` should be replaced with `DeckProps.deviceProps.webgl`: `deviceProps: {type: 'webgl', webgl: ...glOptions}`: [WebGLDeviceProps](https://luma.gl/docs/api-reference/webgl/#webgldeviceprops)
55
+
-`DeckProps.glOptions.preserveDrawingBuffers` is now set by default, and does not need to be overridden.
56
+
-`DeckProps.onWebGLInitialized` callback is now `DeckProps.onDeviceInitialized`.
57
+
-`LayerProps.parameters` and `LayerProps.textureParameters` no longer use WebGL constants, but instead use (WebGPU style) [string constants](https://luma.gl/docs/api-reference/core/parameters/).
56
58
- When providing [binary data attributes](./api-reference/core/layer.md#data), `type` is now a WebGPU-style [string format](https://luma.gl/docs/api-guide/gpu/gpu-attributes#vertexformat) instead of a GL constant.
57
-
- GPU resources should no longer be initiated from classes. For example, instead of `new Buffer()` use `device.createBuffer()`, instead of `new Texture()` use `device.createTexture()`. See [Device methods](https://luma.gl/docs/api-reference/core/device#methods).
59
+
- GPU resources should no longer be created by directly instantiating classes. For example, instead of `new Buffer(gl)` use `device.createBuffer()`, instead of `new Texture()` use `device.createTexture()`. See [Device methods](https://luma.gl/docs/api-reference/core/device#methods).
0 commit comments