@luma.gl/webgl 9.0.0-beta.3 → 9.0.0-beta.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (237) hide show
  1. package/dist/adapter/converters/device-parameters.js +240 -158
  2. package/dist/adapter/converters/sampler-parameters.d.ts +0 -4
  3. package/dist/adapter/converters/sampler-parameters.d.ts.map +1 -1
  4. package/dist/adapter/converters/sampler-parameters.js +73 -68
  5. package/dist/adapter/converters/shader-formats.js +33 -46
  6. package/dist/adapter/converters/texture-formats.d.ts +9 -18
  7. package/dist/adapter/converters/texture-formats.d.ts.map +1 -1
  8. package/dist/adapter/converters/texture-formats.js +454 -871
  9. package/dist/adapter/converters/vertex-formats.js +52 -61
  10. package/dist/adapter/device-helpers/device-features.d.ts +2 -5
  11. package/dist/adapter/device-helpers/device-features.d.ts.map +1 -1
  12. package/dist/adapter/device-helpers/device-features.js +56 -87
  13. package/dist/adapter/device-helpers/device-limits.d.ts +2 -4
  14. package/dist/adapter/device-helpers/device-limits.d.ts.map +1 -1
  15. package/dist/adapter/device-helpers/device-limits.js +88 -83
  16. package/dist/adapter/device-helpers/get-device-info.d.ts +1 -1
  17. package/dist/adapter/device-helpers/get-device-info.d.ts.map +1 -1
  18. package/dist/adapter/device-helpers/get-device-info.js +79 -63
  19. package/dist/adapter/device-helpers/webgl-device-features.d.ts +6 -0
  20. package/dist/adapter/device-helpers/webgl-device-features.d.ts.map +1 -0
  21. package/dist/adapter/device-helpers/webgl-device-features.js +52 -0
  22. package/dist/adapter/device-helpers/webgl-device-info.d.ts +4 -0
  23. package/dist/adapter/device-helpers/webgl-device-info.d.ts.map +1 -0
  24. package/dist/adapter/device-helpers/webgl-device-info.js +87 -0
  25. package/dist/adapter/device-helpers/webgl-device-limits.d.ts +50 -0
  26. package/dist/adapter/device-helpers/webgl-device-limits.d.ts.map +1 -0
  27. package/dist/adapter/device-helpers/webgl-device-limits.js +92 -0
  28. package/dist/adapter/helpers/decode-webgl-types.js +87 -76
  29. package/dist/adapter/helpers/get-shader-layout.d.ts +1 -1
  30. package/dist/adapter/helpers/get-shader-layout.d.ts.map +1 -1
  31. package/dist/adapter/helpers/get-shader-layout.js +261 -226
  32. package/dist/adapter/helpers/parse-shader-compiler-log.js +46 -37
  33. package/dist/adapter/helpers/set-uniform.d.ts +1 -1
  34. package/dist/adapter/helpers/set-uniform.d.ts.map +1 -1
  35. package/dist/adapter/helpers/set-uniform.js +67 -82
  36. package/dist/adapter/helpers/webgl-topology-utils.js +77 -93
  37. package/dist/adapter/objects/constants-to-keys.d.ts +1 -1
  38. package/dist/adapter/objects/constants-to-keys.d.ts.map +1 -1
  39. package/dist/adapter/objects/constants-to-keys.js +18 -12
  40. package/dist/adapter/objects/webgl-renderbuffer.js +76 -80
  41. package/dist/adapter/objects/webgl-resource.d.ts +1 -1
  42. package/dist/adapter/objects/webgl-resource.d.ts.map +1 -1
  43. package/dist/adapter/objects/webgl-resource.js +204 -154
  44. package/dist/adapter/resources/webgl-buffer.d.ts +2 -3
  45. package/dist/adapter/resources/webgl-buffer.d.ts.map +1 -1
  46. package/dist/adapter/resources/webgl-buffer.js +160 -119
  47. package/dist/adapter/resources/webgl-command-buffer.d.ts.map +1 -1
  48. package/dist/adapter/resources/webgl-command-buffer.js +268 -171
  49. package/dist/adapter/resources/webgl-command-encoder.js +32 -40
  50. package/dist/adapter/resources/webgl-external-texture.js +92 -1
  51. package/dist/adapter/resources/webgl-framebuffer.d.ts +2 -2
  52. package/dist/adapter/resources/webgl-framebuffer.d.ts.map +1 -1
  53. package/dist/adapter/resources/webgl-framebuffer.js +167 -139
  54. package/dist/adapter/resources/webgl-render-pass.js +121 -95
  55. package/dist/adapter/resources/webgl-render-pipeline.d.ts +11 -1
  56. package/dist/adapter/resources/webgl-render-pipeline.d.ts.map +1 -1
  57. package/dist/adapter/resources/webgl-render-pipeline.js +378 -228
  58. package/dist/adapter/resources/webgl-sampler.d.ts +0 -2
  59. package/dist/adapter/resources/webgl-sampler.d.ts.map +1 -1
  60. package/dist/adapter/resources/webgl-sampler.js +43 -34
  61. package/dist/adapter/resources/webgl-shader.d.ts +10 -1
  62. package/dist/adapter/resources/webgl-shader.d.ts.map +1 -1
  63. package/dist/adapter/resources/webgl-shader.js +106 -45
  64. package/dist/adapter/resources/webgl-texture.d.ts +2 -6
  65. package/dist/adapter/resources/webgl-texture.d.ts.map +1 -1
  66. package/dist/adapter/resources/webgl-texture.js +614 -699
  67. package/dist/adapter/resources/webgl-transform-feedback.d.ts +1 -1
  68. package/dist/adapter/resources/webgl-transform-feedback.d.ts.map +1 -1
  69. package/dist/adapter/resources/webgl-transform-feedback.js +143 -145
  70. package/dist/adapter/resources/webgl-vertex-array.d.ts +1 -1
  71. package/dist/adapter/resources/webgl-vertex-array.d.ts.map +1 -1
  72. package/dist/adapter/resources/webgl-vertex-array.js +229 -158
  73. package/dist/adapter/webgl-canvas-context.d.ts.map +1 -1
  74. package/dist/adapter/webgl-canvas-context.js +58 -37
  75. package/dist/adapter/webgl-device.d.ts +7 -15
  76. package/dist/adapter/webgl-device.d.ts.map +1 -1
  77. package/dist/adapter/webgl-device.js +440 -381
  78. package/dist/classic/accessor.js +132 -102
  79. package/dist/classic/clear.d.ts +2 -2
  80. package/dist/classic/clear.d.ts.map +1 -1
  81. package/dist/classic/clear.js +73 -73
  82. package/dist/classic/copy-and-blit.d.ts.map +1 -1
  83. package/dist/classic/copy-and-blit.js +176 -177
  84. package/dist/classic/format-utils.d.ts +2 -2
  85. package/dist/classic/format-utils.js +38 -32
  86. package/dist/classic/typed-array-utils.js +95 -81
  87. package/dist/context/{polyfill → context}/context-data.d.ts +2 -1
  88. package/dist/context/context/context-data.d.ts.map +1 -0
  89. package/dist/context/context/context-data.js +33 -0
  90. package/dist/context/context/create-browser-context.d.ts +1 -6
  91. package/dist/context/context/create-browser-context.d.ts.map +1 -1
  92. package/dist/context/context/create-browser-context.js +62 -49
  93. package/dist/context/debug/spector.js +54 -50
  94. package/dist/context/debug/webgl-developer-tools.d.ts +1 -2
  95. package/dist/context/debug/webgl-developer-tools.d.ts.map +1 -1
  96. package/dist/context/debug/webgl-developer-tools.js +102 -76
  97. package/dist/context/parameters/unified-parameter-api.d.ts +3 -3
  98. package/dist/context/parameters/unified-parameter-api.d.ts.map +1 -1
  99. package/dist/context/parameters/unified-parameter-api.js +95 -46
  100. package/dist/context/parameters/webgl-parameter-tables.d.ts +110 -99
  101. package/dist/context/parameters/webgl-parameter-tables.d.ts.map +1 -1
  102. package/dist/context/parameters/webgl-parameter-tables.js +456 -404
  103. package/dist/context/state-tracker/deep-array-equal.js +18 -14
  104. package/dist/context/state-tracker/track-context-state.d.ts +4 -4
  105. package/dist/context/state-tracker/track-context-state.d.ts.map +1 -1
  106. package/dist/context/state-tracker/track-context-state.js +190 -126
  107. package/dist/context/state-tracker/with-parameters.d.ts +1 -1
  108. package/dist/context/state-tracker/with-parameters.d.ts.map +1 -1
  109. package/dist/context/state-tracker/with-parameters.js +45 -29
  110. package/dist/dist.dev.js +2568 -3786
  111. package/dist/index.cjs +1346 -2464
  112. package/dist/index.cjs.map +7 -0
  113. package/dist/index.d.ts +2 -5
  114. package/dist/index.d.ts.map +1 -1
  115. package/dist/index.js +36 -26
  116. package/dist/types.js +2 -1
  117. package/dist.min.js +9 -42
  118. package/package.json +11 -15
  119. package/src/adapter/converters/device-parameters.ts +0 -1
  120. package/src/adapter/converters/sampler-parameters.ts +0 -17
  121. package/src/adapter/converters/texture-formats.ts +86 -154
  122. package/src/adapter/device-helpers/webgl-device-features.ts +69 -0
  123. package/src/adapter/device-helpers/{get-device-info.ts → webgl-device-info.ts} +3 -4
  124. package/src/adapter/device-helpers/{device-limits.ts → webgl-device-limits.ts} +25 -23
  125. package/src/adapter/helpers/get-shader-layout.ts +17 -28
  126. package/src/adapter/helpers/set-uniform.ts +1 -3
  127. package/src/adapter/objects/constants-to-keys.ts +1 -1
  128. package/src/adapter/objects/webgl-renderbuffer.ts +4 -4
  129. package/src/adapter/objects/webgl-resource.ts +3 -18
  130. package/src/adapter/resources/webgl-buffer.ts +6 -11
  131. package/src/adapter/resources/webgl-command-buffer.ts +20 -30
  132. package/src/adapter/resources/webgl-external-texture.ts +2 -3
  133. package/src/adapter/resources/webgl-framebuffer.ts +4 -5
  134. package/src/adapter/resources/webgl-render-pass.ts +7 -7
  135. package/src/adapter/resources/webgl-render-pipeline.ts +106 -31
  136. package/src/adapter/resources/webgl-sampler.ts +5 -9
  137. package/src/adapter/resources/webgl-shader.ts +57 -10
  138. package/src/adapter/resources/webgl-texture.ts +29 -103
  139. package/src/adapter/resources/webgl-transform-feedback.ts +14 -15
  140. package/src/adapter/resources/webgl-vertex-array.ts +16 -18
  141. package/src/adapter/webgl-canvas-context.ts +1 -7
  142. package/src/adapter/webgl-device.ts +18 -67
  143. package/src/classic/clear.ts +13 -14
  144. package/src/classic/copy-and-blit.ts +1 -2
  145. package/src/context/context/context-data.ts +44 -0
  146. package/src/context/context/create-browser-context.ts +7 -32
  147. package/src/context/debug/webgl-developer-tools.ts +6 -8
  148. package/src/context/parameters/unified-parameter-api.ts +3 -3
  149. package/src/context/parameters/webgl-parameter-tables.ts +66 -75
  150. package/src/context/state-tracker/track-context-state.ts +18 -17
  151. package/src/context/state-tracker/with-parameters.ts +1 -1
  152. package/src/index.ts +2 -17
  153. package/dist/adapter/converters/device-parameters.js.map +0 -1
  154. package/dist/adapter/converters/sampler-parameters.js.map +0 -1
  155. package/dist/adapter/converters/shader-formats.js.map +0 -1
  156. package/dist/adapter/converters/texture-formats.js.map +0 -1
  157. package/dist/adapter/converters/vertex-formats.js.map +0 -1
  158. package/dist/adapter/device-helpers/device-features.js.map +0 -1
  159. package/dist/adapter/device-helpers/device-limits.js.map +0 -1
  160. package/dist/adapter/device-helpers/get-device-info.js.map +0 -1
  161. package/dist/adapter/device-helpers/is-old-ie.d.ts +0 -2
  162. package/dist/adapter/device-helpers/is-old-ie.d.ts.map +0 -1
  163. package/dist/adapter/device-helpers/is-old-ie.js +0 -9
  164. package/dist/adapter/device-helpers/is-old-ie.js.map +0 -1
  165. package/dist/adapter/helpers/decode-webgl-types.js.map +0 -1
  166. package/dist/adapter/helpers/get-shader-layout.js.map +0 -1
  167. package/dist/adapter/helpers/parse-shader-compiler-log.js.map +0 -1
  168. package/dist/adapter/helpers/set-uniform.js.map +0 -1
  169. package/dist/adapter/helpers/webgl-topology-utils.js.map +0 -1
  170. package/dist/adapter/objects/constants-to-keys.js.map +0 -1
  171. package/dist/adapter/objects/webgl-renderbuffer.js.map +0 -1
  172. package/dist/adapter/objects/webgl-resource.js.map +0 -1
  173. package/dist/adapter/resources/webgl-buffer.js.map +0 -1
  174. package/dist/adapter/resources/webgl-command-buffer.js.map +0 -1
  175. package/dist/adapter/resources/webgl-command-encoder.js.map +0 -1
  176. package/dist/adapter/resources/webgl-external-texture.js.map +0 -1
  177. package/dist/adapter/resources/webgl-framebuffer.js.map +0 -1
  178. package/dist/adapter/resources/webgl-render-pass.js.map +0 -1
  179. package/dist/adapter/resources/webgl-render-pipeline.js.map +0 -1
  180. package/dist/adapter/resources/webgl-sampler.js.map +0 -1
  181. package/dist/adapter/resources/webgl-shader.js.map +0 -1
  182. package/dist/adapter/resources/webgl-texture.js.map +0 -1
  183. package/dist/adapter/resources/webgl-transform-feedback.js.map +0 -1
  184. package/dist/adapter/resources/webgl-vertex-array.js.map +0 -1
  185. package/dist/adapter/webgl-canvas-context.js.map +0 -1
  186. package/dist/adapter/webgl-device.js.map +0 -1
  187. package/dist/classic/accessor.js.map +0 -1
  188. package/dist/classic/clear.js.map +0 -1
  189. package/dist/classic/copy-and-blit.js.map +0 -1
  190. package/dist/classic/format-utils.js.map +0 -1
  191. package/dist/classic/typed-array-utils.js.map +0 -1
  192. package/dist/context/context/create-browser-context.js.map +0 -1
  193. package/dist/context/context/create-headless-context.d.ts +0 -9
  194. package/dist/context/context/create-headless-context.d.ts.map +0 -1
  195. package/dist/context/context/create-headless-context.js +0 -42
  196. package/dist/context/context/create-headless-context.js.map +0 -1
  197. package/dist/context/context/webgl-checks.d.ts +0 -13
  198. package/dist/context/context/webgl-checks.d.ts.map +0 -1
  199. package/dist/context/context/webgl-checks.js +0 -31
  200. package/dist/context/context/webgl-checks.js.map +0 -1
  201. package/dist/context/debug/spector.js.map +0 -1
  202. package/dist/context/debug/webgl-developer-tools.js.map +0 -1
  203. package/dist/context/parameters/unified-parameter-api.js.map +0 -1
  204. package/dist/context/parameters/webgl-parameter-tables.js.map +0 -1
  205. package/dist/context/polyfill/context-data.d.ts.map +0 -1
  206. package/dist/context/polyfill/context-data.js +0 -12
  207. package/dist/context/polyfill/context-data.js.map +0 -1
  208. package/dist/context/polyfill/get-parameter-polyfill.d.ts +0 -2
  209. package/dist/context/polyfill/get-parameter-polyfill.d.ts.map +0 -1
  210. package/dist/context/polyfill/get-parameter-polyfill.js +0 -85
  211. package/dist/context/polyfill/get-parameter-polyfill.js.map +0 -1
  212. package/dist/context/polyfill/polyfill-context.d.ts +0 -5
  213. package/dist/context/polyfill/polyfill-context.d.ts.map +0 -1
  214. package/dist/context/polyfill/polyfill-context.js +0 -87
  215. package/dist/context/polyfill/polyfill-context.js.map +0 -1
  216. package/dist/context/polyfill/polyfill-table.d.ts +0 -48
  217. package/dist/context/polyfill/polyfill-table.d.ts.map +0 -1
  218. package/dist/context/polyfill/polyfill-table.js +0 -137
  219. package/dist/context/polyfill/polyfill-table.js.map +0 -1
  220. package/dist/context/polyfill/polyfill-vertex-array-object.d.ts +0 -2
  221. package/dist/context/polyfill/polyfill-vertex-array-object.d.ts.map +0 -1
  222. package/dist/context/polyfill/polyfill-vertex-array-object.js +0 -265
  223. package/dist/context/polyfill/polyfill-vertex-array-object.js.map +0 -1
  224. package/dist/context/state-tracker/deep-array-equal.js.map +0 -1
  225. package/dist/context/state-tracker/track-context-state.js.map +0 -1
  226. package/dist/context/state-tracker/with-parameters.js.map +0 -1
  227. package/dist/index.js.map +0 -1
  228. package/dist/types.js.map +0 -1
  229. package/src/adapter/device-helpers/device-features.ts +0 -161
  230. package/src/adapter/device-helpers/is-old-ie.ts +0 -14
  231. package/src/context/context/create-headless-context.ts +0 -51
  232. package/src/context/context/webgl-checks.ts +0 -51
  233. package/src/context/polyfill/context-data.ts +0 -30
  234. package/src/context/polyfill/get-parameter-polyfill.ts +0 -122
  235. package/src/context/polyfill/polyfill-context.ts +0 -104
  236. package/src/context/polyfill/polyfill-table.ts +0 -167
  237. package/src/context/polyfill/polyfill-vertex-array-object.ts +0 -365
@@ -1,192 +1,289 @@
1
+ // luma.gl, MIT license
2
+ // Copyright (c) vis.gl contributors
1
3
  import { CommandBuffer, Texture } from '@luma.gl/core';
2
- import { WEBGLTexture } from "./webgl-texture.js";
3
- import { getWebGLTextureParameters } from "../converters/texture-formats.js";
4
+ import { GL } from '@luma.gl/constants';
5
+ import { WEBGLTexture } from './webgl-texture';
6
+ import { getWebGLTextureParameters } from '../converters/texture-formats';
4
7
  function cast(value) {
5
- return value;
8
+ return value;
6
9
  }
7
10
  export class WEBGLCommandBuffer extends CommandBuffer {
8
- constructor(device) {
9
- super(device, {});
10
- this.device = void 0;
11
- this.commands = [];
12
- this.device = device;
13
- }
14
- submitCommands() {
15
- let commands = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : this.commands;
16
- for (const command of commands) {
17
- switch (command.name) {
18
- case 'copy-buffer-to-buffer':
19
- _copyBufferToBuffer(this.device, command.options);
20
- break;
21
- case 'copy-buffer-to-texture':
22
- _copyBufferToTexture(this.device, command.options);
23
- break;
24
- case 'copy-texture-to-buffer':
25
- _copyTextureToBuffer(this.device, command.options);
26
- break;
27
- case 'copy-texture-to-texture':
28
- _copyTextureToTexture(this.device, command.options);
29
- break;
30
- }
11
+ device;
12
+ commands = [];
13
+ constructor(device) {
14
+ super(device, {});
15
+ this.device = device;
16
+ }
17
+ submitCommands(commands = this.commands) {
18
+ for (const command of commands) {
19
+ switch (command.name) {
20
+ case 'copy-buffer-to-buffer':
21
+ _copyBufferToBuffer(this.device, command.options);
22
+ break;
23
+ case 'copy-buffer-to-texture':
24
+ _copyBufferToTexture(this.device, command.options);
25
+ break;
26
+ case 'copy-texture-to-buffer':
27
+ _copyTextureToBuffer(this.device, command.options);
28
+ break;
29
+ case 'copy-texture-to-texture':
30
+ _copyTextureToTexture(this.device, command.options);
31
+ break;
32
+ }
33
+ }
31
34
  }
32
- }
33
35
  }
34
36
  function _copyBufferToBuffer(device, options) {
35
- const source = cast(options.source);
36
- const destination = cast(options.destination);
37
- const gl2 = device.assertWebGL2();
38
- if (gl2) {
39
- var _options$sourceOffset, _options$destinationO;
40
- gl2.bindBuffer(36662, source.handle);
41
- gl2.bindBuffer(36663, destination.handle);
42
- gl2.copyBufferSubData(36662, 36663, (_options$sourceOffset = options.sourceOffset) !== null && _options$sourceOffset !== void 0 ? _options$sourceOffset : 0, (_options$destinationO = options.destinationOffset) !== null && _options$destinationO !== void 0 ? _options$destinationO : 0, options.size);
43
- gl2.bindBuffer(36662, null);
44
- gl2.bindBuffer(36663, null);
45
- } else {
46
- throw new Error('copyBufferToBuffer not implemented in WebGL1');
47
- }
37
+ const source = cast(options.source);
38
+ const destination = cast(options.destination);
39
+ // {In WebGL2 we can p}erform the copy on the GPU
40
+ // Use GL.COPY_READ_BUFFER+GL.COPY_WRITE_BUFFER avoid disturbing other targets and locking type
41
+ device.gl.bindBuffer(GL.COPY_READ_BUFFER, source.handle);
42
+ device.gl.bindBuffer(GL.COPY_WRITE_BUFFER, destination.handle);
43
+ device.gl.copyBufferSubData(GL.COPY_READ_BUFFER, GL.COPY_WRITE_BUFFER, options.sourceOffset ?? 0, options.destinationOffset ?? 0, options.size);
44
+ device.gl.bindBuffer(GL.COPY_READ_BUFFER, null);
45
+ device.gl.bindBuffer(GL.COPY_WRITE_BUFFER, null);
48
46
  }
47
+ /**
48
+ * Copies data from a Buffer object into a Texture object
49
+ * NOTE: doesn't wait for copy to be complete
50
+ */
49
51
  function _copyBufferToTexture(device, options) {
50
- throw new Error('Not implemented');
52
+ throw new Error('Not implemented');
51
53
  }
54
+ /**
55
+ * Copies data from a Texture object into a Buffer object.
56
+ * NOTE: doesn't wait for copy to be complete
57
+ */
52
58
  function _copyTextureToBuffer(device, options) {
53
- const {
54
- source,
55
- mipLevel = 0,
56
- aspect = 'all',
57
- width = options.source.width,
58
- height = options.source.height,
59
- depthOrArrayLayers = 0,
60
- origin = [0, 0],
61
- destination,
62
- byteOffset = 0,
63
- bytesPerRow,
64
- rowsPerImage
65
- } = options;
66
- if (aspect !== 'all') {
67
- throw new Error('not supported');
68
- }
69
- if (mipLevel !== 0 || depthOrArrayLayers !== 0 || bytesPerRow || rowsPerImage) {
70
- throw new Error('not implemented');
71
- }
72
- const gl2 = device.assertWebGL2();
73
- const {
74
- framebuffer,
75
- destroyFramebuffer
76
- } = getFramebuffer(source);
77
- try {
78
- const webglBuffer = destination;
79
- const sourceWidth = width || framebuffer.width;
80
- const sourceHeight = height || framebuffer.height;
81
- const sourceParams = getWebGLTextureParameters(framebuffer.texture.format, true);
82
- const sourceFormat = sourceParams.dataFormat;
83
- const sourceType = sourceParams.type;
84
- gl2.bindBuffer(35051, webglBuffer.handle);
85
- gl2.bindFramebuffer(36160, framebuffer.handle);
86
- gl2.readPixels(origin[0], origin[1], sourceWidth, sourceHeight, sourceFormat, sourceType, byteOffset);
87
- } finally {
88
- gl2.bindBuffer(35051, null);
89
- gl2.bindFramebuffer(36160, null);
90
- if (destroyFramebuffer) {
91
- framebuffer.destroy();
59
+ const {
60
+ /** Texture to copy to/from. */
61
+ source,
62
+ /** Mip-map level of the texture to copy to/from. (Default 0) */
63
+ mipLevel = 0,
64
+ /** Defines which aspects of the texture to copy to/from. */
65
+ aspect = 'all',
66
+ /** Width to copy */
67
+ width = options.source.width,
68
+ /** Height to copy */
69
+ height = options.source.height, depthOrArrayLayers = 0,
70
+ /** Defines the origin of the copy - the minimum corner of the texture sub-region to copy to/from. */
71
+ origin = [0, 0],
72
+ /** Destination buffer */
73
+ destination,
74
+ /** Offset, in bytes, from the beginning of the buffer to the start of the image data (default 0) */
75
+ byteOffset = 0,
76
+ /**
77
+ * The stride, in bytes, between the beginning of each block row and the subsequent block row.
78
+ * Required if there are multiple block rows (i.e. the copy height or depth is more than one block).
79
+ */
80
+ bytesPerRow,
81
+ /**
82
+ * Number of block rows per single image of the texture.
83
+ * rowsPerImage × bytesPerRow is the stride, in bytes, between the beginning of each image of data and the subsequent image.
84
+ * Required if there are multiple images (i.e. the copy depth is more than one).
85
+ */
86
+ rowsPerImage } = options;
87
+ // TODO - Not possible to read just stencil or depth part in WebGL?
88
+ if (aspect !== 'all') {
89
+ throw new Error('not supported');
90
+ }
91
+ // TODO - mipLevels are set when attaching texture to framebuffer
92
+ if (mipLevel !== 0 || depthOrArrayLayers !== 0 || bytesPerRow || rowsPerImage) {
93
+ throw new Error('not implemented');
94
+ }
95
+ // Asynchronous read (PIXEL_PACK_BUFFER) is WebGL2 only feature
96
+ const { framebuffer, destroyFramebuffer } = getFramebuffer(source);
97
+ try {
98
+ const webglBuffer = destination;
99
+ const sourceWidth = width || framebuffer.width;
100
+ const sourceHeight = height || framebuffer.height;
101
+ const sourceParams = getWebGLTextureParameters(framebuffer.texture.format);
102
+ const sourceFormat = sourceParams.dataFormat;
103
+ const sourceType = sourceParams.type;
104
+ // if (!target) {
105
+ // // Create new buffer with enough size
106
+ // const components = glFormatToComponents(sourceFormat);
107
+ // const byteCount = glTypeToBytes(sourceType);
108
+ // const byteLength = byteOffset + sourceWidth * sourceHeight * components * byteCount;
109
+ // target = device.createBuffer({byteLength});
110
+ // }
111
+ device.gl.bindBuffer(GL.PIXEL_PACK_BUFFER, webglBuffer.handle);
112
+ device.gl.bindFramebuffer(GL.FRAMEBUFFER, framebuffer.handle);
113
+ device.gl.readPixels(origin[0], origin[1], sourceWidth, sourceHeight, sourceFormat, sourceType, byteOffset);
114
+ }
115
+ finally {
116
+ device.gl.bindBuffer(GL.PIXEL_PACK_BUFFER, null);
117
+ device.gl.bindFramebuffer(GL.FRAMEBUFFER, null);
118
+ if (destroyFramebuffer) {
119
+ framebuffer.destroy();
120
+ }
92
121
  }
93
- }
94
122
  }
95
- function _copyTextureToTexture(device, options) {
96
- const {
97
- source,
98
- origin = [0, 0],
99
- destination
100
- } = options;
101
- let {
102
- width = options.destination.width,
103
- height = options.destination.width
104
- } = options;
105
- const destinationMipmaplevel = 0;
106
- const destinationInternalFormat = 6408;
107
- const {
108
- framebuffer,
109
- destroyFramebuffer
110
- } = getFramebuffer(source);
111
- const [sourceX, sourceY] = origin;
112
- const isSubCopy = false;
113
- device.gl.bindFramebuffer(36160, framebuffer.handle);
114
- let texture = null;
115
- let textureTarget;
116
- if (destination instanceof WEBGLTexture) {
117
- texture = destination;
118
- width = Number.isFinite(width) ? width : texture.width;
119
- height = Number.isFinite(height) ? height : texture.height;
120
- texture.bind(0);
121
- textureTarget = texture.destination;
122
- } else {
123
- throw new Error('whoops');
124
- }
125
- if (!isSubCopy) {
126
- device.gl.copyTexImage2D(textureTarget, destinationMipmaplevel, destinationInternalFormat, sourceX, sourceY, width, height, 0);
127
- } else {}
128
- if (texture) {
129
- texture.unbind();
130
- }
131
- if (destroyFramebuffer) {
132
- framebuffer.destroy();
123
+ /**
124
+ * Copies data from a Framebuffer or a Texture object into a Buffer object.
125
+ * NOTE: doesn't wait for copy to be complete, it programs GPU to perform a DMA transfer.
126
+ export function readPixelsToBuffer(
127
+ source: Framebuffer | Texture,
128
+ options?: {
129
+ sourceX?: number;
130
+ sourceY?: number;
131
+ sourceFormat?: number;
132
+ target?: Buffer; // A new Buffer object is created when not provided.
133
+ targetByteOffset?: number; // byte offset in buffer object
134
+ // following parameters are auto deduced if not provided
135
+ sourceWidth?: number;
136
+ sourceHeight?: number;
137
+ sourceType?: number;
133
138
  }
134
- return texture;
139
+ ): Buffer
140
+ */
141
+ /**
142
+ * Copy a rectangle from a Framebuffer or Texture object into a texture (at an offset)
143
+ */
144
+ // eslint-disable-next-line complexity, max-statements
145
+ function _copyTextureToTexture(device, options) {
146
+ const {
147
+ /** Texture to copy to/from. */
148
+ source,
149
+ /** Mip-map level of the texture to copy to/from. (Default 0) */
150
+ // mipLevel = 0,
151
+ /** Defines which aspects of the texture to copy to/from. */
152
+ // aspect = 'all',
153
+ /** Defines the origin of the copy - the minimum corner of the texture sub-region to copy to/from. */
154
+ origin = [0, 0],
155
+ /** Texture to copy to/from. */
156
+ destination,
157
+ /** Mip-map level of the texture to copy to/from. (Default 0) */
158
+ // destinationMipLevel = options.mipLevel,
159
+ /** Defines the origin of the copy - the minimum corner of the texture sub-region to copy to/from. */
160
+ // destinationOrigin = [0, 0],
161
+ /** Defines which aspects of the texture to copy to/from. */
162
+ // destinationAspect = options.aspect,
163
+ } = options;
164
+ let { width = options.destination.width, height = options.destination.width,
165
+ // depthOrArrayLayers = 0
166
+ } = options;
167
+ const destinationMipmaplevel = 0;
168
+ const destinationInternalFormat = GL.RGBA;
169
+ const { framebuffer, destroyFramebuffer } = getFramebuffer(source);
170
+ const [sourceX, sourceY] = origin;
171
+ const isSubCopy = false;
172
+ // typeof destinationX !== 'undefined' ||
173
+ // typeof destinationY !== 'undefined' ||
174
+ // typeof destinationZ !== 'undefined';
175
+ // destinationX = destinationX || 0;
176
+ // destinationY = destinationY || 0;
177
+ // destinationZ = destinationZ || 0;
178
+ device.gl.bindFramebuffer(GL.FRAMEBUFFER, framebuffer.handle);
179
+ // TODO - support gl.readBuffer (WebGL2 only)
180
+ // const prevBuffer = gl.readBuffer(attachment);
181
+ let texture = null;
182
+ let textureTarget;
183
+ if (destination instanceof WEBGLTexture) {
184
+ texture = destination;
185
+ width = Number.isFinite(width) ? width : texture.width;
186
+ height = Number.isFinite(height) ? height : texture.height;
187
+ texture.bind(0);
188
+ textureTarget = texture.destination;
189
+ }
190
+ else {
191
+ throw new Error('whoops');
192
+ // textureTarget = destination;
193
+ }
194
+ if (!isSubCopy) {
195
+ device.gl.copyTexImage2D(textureTarget, destinationMipmaplevel, destinationInternalFormat, sourceX, sourceY, width, height, 0 /* border must be 0 */);
196
+ }
197
+ else {
198
+ // switch (textureTarget) {
199
+ // case GL.TEXTURE_2D:
200
+ // case GL.TEXTURE_CUBE_MAP:
201
+ // device.gl.copyTexSubImage2D(
202
+ // textureTarget,
203
+ // destinationMipmaplevel,
204
+ // destinationX,
205
+ // destinationY,
206
+ // sourceX,
207
+ // sourceY,
208
+ // width,
209
+ // height
210
+ // );
211
+ // break;
212
+ // case GL.TEXTURE_2D_ARRAY:
213
+ // case GL.TEXTURE_3D:
214
+ // device.gl.copyTexSubImage3D(
215
+ // textureTarget,
216
+ // destinationMipmaplevel,
217
+ // destinationX,
218
+ // destinationY,
219
+ // destinationZ,
220
+ // sourceX,
221
+ // sourceY,
222
+ // width,
223
+ // height
224
+ // );
225
+ // break;
226
+ // default:
227
+ // }
228
+ }
229
+ if (texture) {
230
+ texture.unbind();
231
+ }
232
+ // ts-expect-error
233
+ // device.gl.bindFramebuffer(GL.FRAMEBUFFER, prevHandle || null);
234
+ if (destroyFramebuffer) {
235
+ framebuffer.destroy();
236
+ }
237
+ return texture;
135
238
  }
239
+ // Returns number of components in a specific readPixels WebGL format
136
240
  export function glFormatToComponents(format) {
137
- switch (format) {
138
- case 6406:
139
- case 33326:
140
- case 6403:
141
- return 1;
142
- case 33328:
143
- case 33319:
144
- return 2;
145
- case 6407:
146
- case 34837:
147
- return 3;
148
- case 6408:
149
- case 34836:
150
- return 4;
151
- default:
152
- throw new Error('GLFormat');
153
- }
241
+ switch (format) {
242
+ case GL.ALPHA:
243
+ case GL.R32F:
244
+ case GL.RED:
245
+ return 1;
246
+ case GL.RG32F:
247
+ case GL.RG:
248
+ return 2;
249
+ case GL.RGB:
250
+ case GL.RGB32F:
251
+ return 3;
252
+ case GL.RGBA:
253
+ case GL.RGBA32F:
254
+ return 4;
255
+ // TODO: Add support for additional WebGL2 formats
256
+ default:
257
+ throw new Error('GLFormat');
258
+ }
154
259
  }
260
+ // Return byte count for given readPixels WebGL type
155
261
  export function glTypeToBytes(type) {
156
- switch (type) {
157
- case 5121:
158
- return 1;
159
- case 33635:
160
- case 32819:
161
- case 32820:
162
- return 2;
163
- case 5126:
164
- return 4;
165
- default:
166
- throw new Error('GLType');
167
- }
262
+ switch (type) {
263
+ case GL.UNSIGNED_BYTE:
264
+ return 1;
265
+ case GL.UNSIGNED_SHORT_5_6_5:
266
+ case GL.UNSIGNED_SHORT_4_4_4_4:
267
+ case GL.UNSIGNED_SHORT_5_5_5_1:
268
+ return 2;
269
+ case GL.FLOAT:
270
+ return 4;
271
+ // TODO: Add support for additional WebGL2 types
272
+ default:
273
+ throw new Error('GLType');
274
+ }
168
275
  }
276
+ // Helper methods
169
277
  function getFramebuffer(source) {
170
- if (source instanceof Texture) {
171
- const {
172
- width,
173
- height,
174
- id
175
- } = source;
176
- const framebuffer = source.device.createFramebuffer({
177
- id: `framebuffer-for-${id}`,
178
- width,
179
- height,
180
- colorAttachments: [source]
181
- });
182
- return {
183
- framebuffer,
184
- destroyFramebuffer: true
185
- };
186
- }
187
- return {
188
- framebuffer: source,
189
- destroyFramebuffer: false
190
- };
278
+ if (source instanceof Texture) {
279
+ const { width, height, id } = source;
280
+ const framebuffer = source.device.createFramebuffer({
281
+ id: `framebuffer-for-${id}`,
282
+ width,
283
+ height,
284
+ colorAttachments: [source]
285
+ });
286
+ return { framebuffer, destroyFramebuffer: true };
287
+ }
288
+ return { framebuffer: source, destroyFramebuffer: false };
191
289
  }
192
- //# sourceMappingURL=webgl-command-buffer.js.map
@@ -1,43 +1,35 @@
1
+ // luma.gl, MIT license
2
+ // Copyright (c) vis.gl contributors
1
3
  import { CommandEncoder } from '@luma.gl/core';
2
- import { WEBGLCommandBuffer } from "./webgl-command-buffer.js";
4
+ import { WEBGLCommandBuffer } from './webgl-command-buffer';
3
5
  export class WEBGLCommandEncoder extends CommandEncoder {
4
- constructor(device, props) {
5
- super(device, props);
6
- this.device = void 0;
7
- this.commandBuffer = void 0;
8
- this.device = device;
9
- this.commandBuffer = new WEBGLCommandBuffer(device);
10
- }
11
- destroy() {}
12
- finish() {
13
- this.commandBuffer.submitCommands();
14
- }
15
- copyBufferToBuffer(options) {
16
- this.commandBuffer.commands.push({
17
- name: 'copy-buffer-to-buffer',
18
- options
19
- });
20
- }
21
- copyBufferToTexture(options) {
22
- this.commandBuffer.commands.push({
23
- name: 'copy-buffer-to-texture',
24
- options
25
- });
26
- }
27
- copyTextureToBuffer(options) {
28
- this.commandBuffer.commands.push({
29
- name: 'copy-texture-to-buffer',
30
- options
31
- });
32
- }
33
- copyTextureToTexture(options) {
34
- this.commandBuffer.commands.push({
35
- name: 'copy-texture-to-texture',
36
- options
37
- });
38
- }
39
- pushDebugGroup(groupLabel) {}
40
- popDebugGroup() {}
41
- insertDebugMarker(markerLabel) {}
6
+ device;
7
+ commandBuffer;
8
+ constructor(device, props) {
9
+ super(device, props);
10
+ this.device = device;
11
+ this.commandBuffer = new WEBGLCommandBuffer(device);
12
+ }
13
+ destroy() { }
14
+ finish() {
15
+ this.commandBuffer.submitCommands();
16
+ }
17
+ // beginRenderPass(GPURenderPassDescriptor descriptor): GPURenderPassEncoder;
18
+ // beginComputePass(optional GPUComputePassDescriptor descriptor = {}): GPUComputePassEncoder;
19
+ // finish(options?: {id?: string}): GPUCommandBuffer;
20
+ copyBufferToBuffer(options) {
21
+ this.commandBuffer.commands.push({ name: 'copy-buffer-to-buffer', options });
22
+ }
23
+ copyBufferToTexture(options) {
24
+ this.commandBuffer.commands.push({ name: 'copy-buffer-to-texture', options });
25
+ }
26
+ copyTextureToBuffer(options) {
27
+ this.commandBuffer.commands.push({ name: 'copy-texture-to-buffer', options });
28
+ }
29
+ copyTextureToTexture(options) {
30
+ this.commandBuffer.commands.push({ name: 'copy-texture-to-texture', options });
31
+ }
32
+ pushDebugGroup(groupLabel) { }
33
+ popDebugGroup() { }
34
+ insertDebugMarker(markerLabel) { }
42
35
  }
43
- //# sourceMappingURL=webgl-command-encoder.js.map
@@ -1,2 +1,93 @@
1
+ // luma.gl, MIT license
2
+ // Copyright (c) vis.gl contributors
3
+ /*
4
+ export class WEBGLExternalTexture extends WEBGLTexture {
5
+ readonly device: WebGLDevice;
6
+ readonly gl: WebGL2RenderingContext;
7
+ readonly handle: WebGLTexture;
1
8
 
2
- //# sourceMappingURL=webgl-external-texture.js.map
9
+ data;
10
+
11
+ width: number = undefined;
12
+ height: number = undefined;
13
+ depth: number = undefined;
14
+
15
+ format = undefined;
16
+ type = undefined;
17
+ dataFormat = undefined;
18
+ border = undefined;
19
+ mipmaps: boolean = undefined;
20
+
21
+ textureUnit: number = undefined;
22
+
23
+ sampler: WEBGLSampler;
24
+
25
+ // Program.draw() checks the loaded flag of all textures to avoid
26
+ // Textures that are still loading from promises
27
+ // Set to true as soon as texture has been initialized with valid data
28
+ loaded = false;
29
+ _video;
30
+
31
+ readonly target: GL;
32
+ // target cannot be modified by bind:
33
+ // textures are special because when you first bind them to a target,
34
+ // they get special information. When you first bind a texture as a
35
+ // GL_TEXTURE_2D, you are actually setting special state in the texture.
36
+ // You are saying that this texture is a 2D texture.
37
+ // And it will always be a 2D texture; this state cannot be changed ever.
38
+ // If you have a texture that was first bound as a GL_TEXTURE_2D,
39
+ // you must always bind it as a GL_TEXTURE_2D;
40
+ // attempting to bind it as GL_TEXTURE_3D will give rise to an error
41
+ // (while run-time).
42
+
43
+ static isSupported(device: WebGLDevice, options?: TextureSupportOptions): boolean {
44
+ const {format, linearFiltering} = options;
45
+ let supported = true;
46
+ if (format) {
47
+ supported = supported && isFormatSupported(device.gl, format);
48
+ supported = supported && (!linearFiltering || isTextureFormatFilterable(device.gl, format));
49
+ }
50
+ return supported;
51
+ }
52
+
53
+ // eslint-disable-next-line max-statements
54
+ constructor(device: Device | WebGL2RenderingContext, props: TextureProps) {
55
+ super(WebGLDevice.attach(device), {id: uid('texture'), ...props});
56
+
57
+ this.glTarget = getWebGLTextureTarget(props);
58
+
59
+ this.device = WebGLDevice.attach(device);
60
+ this.gl = this.device.gl;
61
+ this.gl2 = this.device.gl2;
62
+ this.handle = this.props.handle || this.gl.createTexture();
63
+
64
+ let data = props.data;
65
+
66
+ const isVideo = typeof HTMLVideoElement !== 'undefined' && data instanceof HTMLVideoElement;
67
+ // @ts-expect-error
68
+ if (isVideo && data.readyState < HTMLVideoElement.HAVE_METADATA) {
69
+ this._video = null; // Declare member before the object is sealed
70
+ data.addEventListener('loadeddata', () => this.initialize(props));
71
+ return this;
72
+ }
73
+
74
+ update(): this {
75
+ if (this._video) {
76
+ const {video, parameters, lastTime} = this._video;
77
+ // @ts-expect-error
78
+ if (lastTime === video.currentTime || video.readyState < HTMLVideoElement.HAVE_CURRENT_DATA) {
79
+ return;
80
+ }
81
+ this.setSubImageData({
82
+ data: video,
83
+ parameters
84
+ });
85
+ if (this.mipmaps) {
86
+ this.generateMipmap();
87
+ }
88
+ this._video.lastTime = video.currentTime;
89
+ }
90
+ }
91
+
92
+
93
+ */
@@ -9,7 +9,7 @@ export type Attachment = WEBGLTexture | WEBGLRenderbuffer | TextureAttachment;
9
9
  /** luma.gl Framebuffer, WebGL implementation */
10
10
  export declare class WEBGLFramebuffer extends Framebuffer {
11
11
  device: WebGLDevice;
12
- gl: WebGLRenderingContext;
12
+ gl: WebGL2RenderingContext;
13
13
  handle: WebGLFramebuffer;
14
14
  get texture(): Texture<import("@luma.gl/core").TextureProps>;
15
15
  constructor(device: WebGLDevice, props: FramebufferProps);
@@ -30,7 +30,7 @@ export declare class WEBGLFramebuffer extends Framebuffer {
30
30
  * @param attachment
31
31
  * @param texture
32
32
  * @param layer = 0 - index into WEBGLTextureArray and Texture3D or face for `TextureCubeMap`
33
- * @param level = 0 - mipmapLevel (must be 0 in WebGL1)
33
+ * @param level = 0 - mipmapLevel
34
34
  */
35
35
  protected _attachTexture(attachment: GL, texture: WEBGLTexture, layer: number, level: number): void;
36
36
  }
@@ -1 +1 @@
1
- {"version":3,"file":"webgl-framebuffer.d.ts","sourceRoot":"","sources":["../../../src/adapter/resources/webgl-framebuffer.ts"],"names":[],"mappings":"AAGA,O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