@flighthq/render-gl 0.1.0 → 0.2.1-next.410.a23f189

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 (67) hide show
  1. package/dist/glCompressedTexture.d.ts +8 -0
  2. package/dist/glCompressedTexture.d.ts.map +1 -0
  3. package/dist/glCompressedTexture.js +270 -0
  4. package/dist/glCompressedTexture.js.map +1 -0
  5. package/dist/glDraw.d.ts +7 -2
  6. package/dist/glDraw.d.ts.map +1 -1
  7. package/dist/glDraw.js +260 -35
  8. package/dist/glDraw.js.map +1 -1
  9. package/dist/glFullscreenPass.d.ts.map +1 -1
  10. package/dist/glFullscreenPass.js +32 -0
  11. package/dist/glFullscreenPass.js.map +1 -1
  12. package/dist/glLinearToSrgbPass.d.ts +4 -0
  13. package/dist/glLinearToSrgbPass.d.ts.map +1 -0
  14. package/dist/glLinearToSrgbPass.js +42 -0
  15. package/dist/glLinearToSrgbPass.js.map +1 -0
  16. package/dist/glPresentRenderTarget.d.ts +3 -0
  17. package/dist/glPresentRenderTarget.d.ts.map +1 -0
  18. package/dist/glPresentRenderTarget.js +35 -0
  19. package/dist/glPresentRenderTarget.js.map +1 -0
  20. package/dist/glRenderPass.d.ts +5 -0
  21. package/dist/glRenderPass.d.ts.map +1 -0
  22. package/dist/glRenderPass.js +130 -0
  23. package/dist/glRenderPass.js.map +1 -0
  24. package/dist/glRenderState.d.ts +1 -1
  25. package/dist/glRenderState.d.ts.map +1 -1
  26. package/dist/glRenderState.js +5 -2
  27. package/dist/glRenderState.js.map +1 -1
  28. package/dist/glRenderTarget.d.ts +2 -15
  29. package/dist/glRenderTarget.d.ts.map +1 -1
  30. package/dist/glRenderTarget.js +48 -57
  31. package/dist/glRenderTarget.js.map +1 -1
  32. package/dist/glRenderTargetPool.d.ts.map +1 -1
  33. package/dist/glRenderTargetPool.js +11 -0
  34. package/dist/glRenderTargetPool.js.map +1 -1
  35. package/dist/glSkinPaletteTexture.d.ts +5 -0
  36. package/dist/glSkinPaletteTexture.d.ts.map +1 -0
  37. package/dist/glSkinPaletteTexture.js +42 -0
  38. package/dist/glSkinPaletteTexture.js.map +1 -0
  39. package/dist/glTestHelper.d.ts.map +1 -1
  40. package/dist/glTestHelper.js +1 -0
  41. package/dist/glTestHelper.js.map +1 -1
  42. package/dist/glTextureUpload.d.ts +5 -0
  43. package/dist/glTextureUpload.d.ts.map +1 -0
  44. package/dist/glTextureUpload.js +27 -0
  45. package/dist/glTextureUpload.js.map +1 -0
  46. package/dist/glTextureVideoUpload.d.ts +3 -0
  47. package/dist/glTextureVideoUpload.d.ts.map +1 -0
  48. package/dist/glTextureVideoUpload.js +24 -0
  49. package/dist/glTextureVideoUpload.js.map +1 -0
  50. package/dist/index.d.ts +7 -0
  51. package/dist/index.d.ts.map +1 -1
  52. package/dist/index.js +7 -0
  53. package/dist/index.js.map +1 -1
  54. package/package.json +10 -5
  55. package/src/glBackground.test.ts +3 -1
  56. package/src/glCompressedTexture.test.ts +276 -0
  57. package/src/glDraw.test.ts +449 -4
  58. package/src/glFullscreenPass.test.ts +22 -1
  59. package/src/glLinearToSrgbPass.test.ts +75 -0
  60. package/src/glPresentRenderTarget.test.ts +62 -0
  61. package/src/glReadback.test.ts +1 -0
  62. package/src/glRenderPass.test.ts +170 -0
  63. package/src/glRenderTarget.test.ts +63 -98
  64. package/src/glRenderTargetPool.test.ts +27 -0
  65. package/src/glSkinPaletteTexture.test.ts +129 -0
  66. package/src/glTextureUpload.test.ts +49 -0
  67. package/src/glTextureVideoUpload.test.ts +53 -0
@@ -0,0 +1,8 @@
1
+ import type { GlCompressedTextureDecoder, GlCompressedTextureSupport, GlRenderState, TextureContainer, TextureContainerFormat } from '@flighthq/types';
2
+ export declare function detectGlCompressedTextureSupport(gl: WebGL2RenderingContext): GlCompressedTextureSupport;
3
+ export declare function getGlCompressedTextureFormat(gl: WebGL2RenderingContext, format: TextureContainerFormat): number;
4
+ export declare function hasGlCompressedTextureFormat(support: Readonly<GlCompressedTextureSupport>, format: TextureContainerFormat): boolean;
5
+ export declare function registerGlCompressedTextureDecoder(state: GlRenderState, decode: GlCompressedTextureDecoder | null): void;
6
+ export declare function registerGlCompressedTextureUpload(state: GlRenderState, uploader?: null): void;
7
+ export declare function uploadGlCompressedTextureContainer(gl: WebGL2RenderingContext, container: Readonly<TextureContainer>, payload: Readonly<Uint8Array>, decode?: GlCompressedTextureDecoder): boolean;
8
+ //# sourceMappingURL=glCompressedTexture.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"glCompressedTexture.d.ts","sourceRoot":"","sources":["../src/glCompressedTexture.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,0BAA0B,EAC1B,0BAA0B,EAC1B,aAAa,EAEb,gBAAgB,EAChB,sBAAsB,EACvB,MAAM,iBAAiB,CAAC;AAmBzB,wBAAgB,gCAAgC,CAAC,EAAE,EAAE,sBAAsB,GAAG,0BAA0B,CAWvG;AAQD,wBAAgB,4BAA4B,CAAC,EAAE,EAAE,sBAAsB,EAAE,MAAM,EAAE,sBAAsB,GAAG,MAAM,CAqG/G;AAKD,wBAAgB,4BAA4B,CAC1C,OAAO,EAAE,QAAQ,CAAC,0BAA0B,CAAC,EAC7C,MAAM,EAAE,sBAAsB,GAC7B,OAAO,CAuCT;AAOD,wBAAgB,kCAAkC,CAChD,KAAK,EAAE,aAAa,EACpB,MAAM,EAAE,0BAA0B,GAAG,IAAI,GACxC,IAAI,CAEN;AASD,wBAAgB,iCAAiC,CAAC,KAAK,EAAE,aAAa,EAAE,QAAQ,CAAC,EAAE,IAAI,GAAG,IAAI,CAE7F;AAiBD,wBAAgB,kCAAkC,CAChD,EAAE,EAAE,sBAAsB,EAC1B,SAAS,EAAE,QAAQ,CAAC,gBAAgB,CAAC,EACrC,OAAO,EAAE,QAAQ,CAAC,UAAU,CAAC,EAC7B,MAAM,CAAC,EAAE,0BAA0B,GAClC,OAAO,CA0DT"}
@@ -0,0 +1,270 @@
1
+ import { getGlRenderStateRuntime } from './glRenderState';
2
+ // GPU-native block-compressed texture upload for WebGL2: hand a parsed TextureContainer (KTX2 / DDS /
3
+ // ATF) plus its byte payload and this pushes every mip level straight to the GPU with
4
+ // `compressedTexImage2D` — no CPU decode — when the device exposes the matching
5
+ // `WEBGL_compressed_texture_*` extension. When it does not, an optional RGBA decode seam turns each
6
+ // level into plain pixels the portable `texImage2D` path uploads, so an asset still renders on
7
+ // hardware missing that block format (desktop S3TC/BPTC vs mobile ETC2/ASTC).
8
+ //
9
+ // Detection is done once per context via `detectGlCompressedTextureSupport`; the format→GL-enum
10
+ // mapping reads the live extension objects, so the enum constants come from the browser, not a baked
11
+ // table. Basis intermediate formats (`etc1s`/`uastc`) are NOT uploaded here — they must be transcoded
12
+ // to a concrete BCn/ETC/ASTC format first (see the deferred `@flighthq/texture-transcode` seam).
13
+ // Probes which block-compressed families the WebGL2 context can upload natively, from its
14
+ // `WEBGL_compressed_texture_*` extensions. Call once per context and cache the result; each `getExtension`
15
+ // activates the extension so the enum constants become readable by `getGlCompressedTextureFormat`.
16
+ export function detectGlCompressedTextureSupport(gl) {
17
+ return {
18
+ astc: gl.getExtension('WEBGL_compressed_texture_astc') !== null,
19
+ bptc: gl.getExtension('EXT_texture_compression_bptc') !== null,
20
+ etc: gl.getExtension('WEBGL_compressed_texture_etc') !== null,
21
+ pvrtc: gl.getExtension('WEBGL_compressed_texture_pvrtc') !== null,
22
+ rgtc: gl.getExtension('EXT_texture_compression_rgtc') !== null,
23
+ s3tc: gl.getExtension('WEBGL_compressed_texture_s3tc') !== null &&
24
+ gl.getExtension('WEBGL_compressed_texture_s3tc_srgb') !== null,
25
+ };
26
+ }
27
+ // Resolves the GL `internalformat` enum for a container format from the device's live compression
28
+ // extensions, or -1 when the device cannot upload that format natively (missing extension, or an
29
+ // uncompressed / Basis-intermediate format that is not a `compressedTexImage2D` target). The returned
30
+ // number is the exact enum `compressedTexImage2D` expects, read off the extension object so it matches
31
+ // the running browser. Requires the relevant extension to already be enabled (call
32
+ // `detectGlCompressedTextureSupport` first).
33
+ export function getGlCompressedTextureFormat(gl, format) {
34
+ const s3tc = gl.getExtension('WEBGL_compressed_texture_s3tc');
35
+ const s3tcSrgb = gl.getExtension('WEBGL_compressed_texture_s3tc_srgb');
36
+ const rgtc = gl.getExtension('EXT_texture_compression_rgtc');
37
+ const bptc = gl.getExtension('EXT_texture_compression_bptc');
38
+ const etc = gl.getExtension('WEBGL_compressed_texture_etc');
39
+ const astc = gl.getExtension('WEBGL_compressed_texture_astc');
40
+ const pvrtc = gl.getExtension('WEBGL_compressed_texture_pvrtc');
41
+ const enumFromExt = (ext, key) => typeof ext?.[key] === 'number' ? ext[key] : -1;
42
+ switch (format) {
43
+ case 'bc1':
44
+ return enumFromExt(s3tc, 'COMPRESSED_RGBA_S3TC_DXT1_EXT');
45
+ case 'bc1Srgb':
46
+ return enumFromExt(s3tcSrgb, 'COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT');
47
+ case 'bc2':
48
+ return enumFromExt(s3tc, 'COMPRESSED_RGBA_S3TC_DXT3_EXT');
49
+ case 'bc2Srgb':
50
+ return enumFromExt(s3tcSrgb, 'COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT');
51
+ case 'bc3':
52
+ return enumFromExt(s3tc, 'COMPRESSED_RGBA_S3TC_DXT5_EXT');
53
+ case 'bc3Srgb':
54
+ return enumFromExt(s3tcSrgb, 'COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT');
55
+ case 'bc4':
56
+ return enumFromExt(rgtc, 'COMPRESSED_RED_RGTC1_EXT');
57
+ case 'bc4Snorm':
58
+ return enumFromExt(rgtc, 'COMPRESSED_SIGNED_RED_RGTC1_EXT');
59
+ case 'bc5':
60
+ return enumFromExt(rgtc, 'COMPRESSED_RED_GREEN_RGTC2_EXT');
61
+ case 'bc5Snorm':
62
+ return enumFromExt(rgtc, 'COMPRESSED_SIGNED_RED_GREEN_RGTC2_EXT');
63
+ case 'bc6hUfloat':
64
+ return enumFromExt(bptc, 'COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT_EXT');
65
+ case 'bc6hSfloat':
66
+ return enumFromExt(bptc, 'COMPRESSED_RGB_BPTC_SIGNED_FLOAT_EXT');
67
+ case 'bc7':
68
+ return enumFromExt(bptc, 'COMPRESSED_RGBA_BPTC_UNORM_EXT');
69
+ case 'bc7Srgb':
70
+ return enumFromExt(bptc, 'COMPRESSED_SRGB_ALPHA_BPTC_UNORM_EXT');
71
+ case 'etc1':
72
+ case 'etc2Rgb':
73
+ return enumFromExt(etc, 'COMPRESSED_RGB8_ETC2');
74
+ case 'etc2RgbSrgb':
75
+ return enumFromExt(etc, 'COMPRESSED_SRGB8_ETC2');
76
+ case 'etc2Rgba':
77
+ return enumFromExt(etc, 'COMPRESSED_RGBA8_ETC2_EAC');
78
+ case 'etc2RgbaSrgb':
79
+ return enumFromExt(etc, 'COMPRESSED_SRGB8_ALPHA8_ETC2_EAC');
80
+ case 'etc2RgbA1':
81
+ return enumFromExt(etc, 'COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2');
82
+ case 'etc2RgbA1Srgb':
83
+ return enumFromExt(etc, 'COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2');
84
+ case 'eacR11':
85
+ return enumFromExt(etc, 'COMPRESSED_R11_EAC');
86
+ case 'eacR11Snorm':
87
+ return enumFromExt(etc, 'COMPRESSED_SIGNED_R11_EAC');
88
+ case 'eacRg11':
89
+ return enumFromExt(etc, 'COMPRESSED_RG11_EAC');
90
+ case 'eacRg11Snorm':
91
+ return enumFromExt(etc, 'COMPRESSED_SIGNED_RG11_EAC');
92
+ case 'pvrtc2bppRgb':
93
+ return enumFromExt(pvrtc, 'COMPRESSED_RGB_PVRTC_2BPPV1_IMG');
94
+ case 'pvrtc2bppRgba':
95
+ return enumFromExt(pvrtc, 'COMPRESSED_RGBA_PVRTC_2BPPV1_IMG');
96
+ case 'pvrtc4bppRgb':
97
+ return enumFromExt(pvrtc, 'COMPRESSED_RGB_PVRTC_4BPPV1_IMG');
98
+ case 'pvrtc4bppRgba':
99
+ return enumFromExt(pvrtc, 'COMPRESSED_RGBA_PVRTC_4BPPV1_IMG');
100
+ case 'astc4x4':
101
+ return enumFromExt(astc, 'COMPRESSED_RGBA_ASTC_4x4_KHR');
102
+ case 'astc5x4':
103
+ return enumFromExt(astc, 'COMPRESSED_RGBA_ASTC_5x4_KHR');
104
+ case 'astc5x5':
105
+ return enumFromExt(astc, 'COMPRESSED_RGBA_ASTC_5x5_KHR');
106
+ case 'astc6x5':
107
+ return enumFromExt(astc, 'COMPRESSED_RGBA_ASTC_6x5_KHR');
108
+ case 'astc6x6':
109
+ return enumFromExt(astc, 'COMPRESSED_RGBA_ASTC_6x6_KHR');
110
+ case 'astc8x5':
111
+ return enumFromExt(astc, 'COMPRESSED_RGBA_ASTC_8x5_KHR');
112
+ case 'astc8x6':
113
+ return enumFromExt(astc, 'COMPRESSED_RGBA_ASTC_8x6_KHR');
114
+ case 'astc8x8':
115
+ return enumFromExt(astc, 'COMPRESSED_RGBA_ASTC_8x8_KHR');
116
+ case 'astc10x5':
117
+ return enumFromExt(astc, 'COMPRESSED_RGBA_ASTC_10x5_KHR');
118
+ case 'astc10x6':
119
+ return enumFromExt(astc, 'COMPRESSED_RGBA_ASTC_10x6_KHR');
120
+ case 'astc10x8':
121
+ return enumFromExt(astc, 'COMPRESSED_RGBA_ASTC_10x8_KHR');
122
+ case 'astc10x10':
123
+ return enumFromExt(astc, 'COMPRESSED_RGBA_ASTC_10x10_KHR');
124
+ case 'astc12x10':
125
+ return enumFromExt(astc, 'COMPRESSED_RGBA_ASTC_12x10_KHR');
126
+ case 'astc12x12':
127
+ return enumFromExt(astc, 'COMPRESSED_RGBA_ASTC_12x12_KHR');
128
+ default:
129
+ // Uncompressed and Basis-intermediate formats have no compressedTexImage2D enum.
130
+ return -1;
131
+ }
132
+ }
133
+ // True when the device's detected support covers a container format's family — the cheap, GL-free gate
134
+ // an asset pipeline uses to pick which of several shipped encodings to upload, without touching the
135
+ // context. `srgb` twins ride the same extension as their unorm base, so both report against one flag.
136
+ export function hasGlCompressedTextureFormat(support, format) {
137
+ switch (format) {
138
+ case 'bc1':
139
+ case 'bc1Srgb':
140
+ case 'bc2':
141
+ case 'bc2Srgb':
142
+ case 'bc3':
143
+ case 'bc3Srgb':
144
+ return support.s3tc;
145
+ case 'bc4':
146
+ case 'bc4Snorm':
147
+ case 'bc5':
148
+ case 'bc5Snorm':
149
+ return support.rgtc;
150
+ case 'bc6hUfloat':
151
+ case 'bc6hSfloat':
152
+ case 'bc7':
153
+ case 'bc7Srgb':
154
+ return support.bptc;
155
+ case 'etc1':
156
+ case 'etc2Rgb':
157
+ case 'etc2RgbSrgb':
158
+ case 'etc2Rgba':
159
+ case 'etc2RgbaSrgb':
160
+ case 'etc2RgbA1':
161
+ case 'etc2RgbA1Srgb':
162
+ case 'eacR11':
163
+ case 'eacR11Snorm':
164
+ case 'eacRg11':
165
+ case 'eacRg11Snorm':
166
+ return support.etc;
167
+ case 'pvrtc2bppRgb':
168
+ case 'pvrtc2bppRgba':
169
+ case 'pvrtc4bppRgb':
170
+ case 'pvrtc4bppRgba':
171
+ return support.pvrtc;
172
+ default:
173
+ return isAstcFormat(format) ? support.astc : false;
174
+ }
175
+ }
176
+ // Installs the RGBA fallback decoder used when the device cannot upload a compressed container's format
177
+ // natively — the seam that lets an S3TC/BPTC asset still render on mobile ETC2/ASTC hardware (and vice
178
+ // versa) by decoding each level to plain pixels. Opt-in and last-write-wins: a state that never draws a
179
+ // compressed texture the device lacks never installs one, so the decoder (and any WASM block-codec it
180
+ // wraps) tree-shakes out. Pass null to clear a previously installed decoder.
181
+ export function registerGlCompressedTextureDecoder(state, decode) {
182
+ getGlRenderStateRuntime(state).compressedTextureDecoder = decode;
183
+ }
184
+ // Installs the block-compressed upload seam on a render state, opting the ~40-format
185
+ // uploadGlCompressedTextureContainer path into the bundle only for a state that actually draws a
186
+ // compressed texture. The 2D display draw path (uploadGlDisplayTexture) reads the installed handler off
187
+ // the runtime and skips a compressed-only resource when none is registered, so a plain element/data
188
+ // bitmap never carries the compression enum table. Opt-in and last-write-wins; pass null to clear a
189
+ // previously installed uploader. The installed handler bridges a compressed ImageResource to
190
+ // uploadGlCompressedTextureContainer, threading through any registered RGBA decode fallback.
191
+ export function registerGlCompressedTextureUpload(state, uploader) {
192
+ getGlRenderStateRuntime(state).compressedTextureUpload = uploader === null ? null : uploadGlCompressedImageResource;
193
+ }
194
+ // Uploads every stored sub-image of a compressed container to the texture the caller has bound. Takes
195
+ // the GPU-native `compressedTexImage2D`/`compressedTexImage3D` path when the device supports the
196
+ // container's format; otherwise, if a `decode` seam is supplied, decompresses each 2D level to RGBA and
197
+ // uploads it through the portable pixel path. Returns `true` when the container was uploaded (either
198
+ // path), `false` when the format is neither natively supported nor decodable, or when the container is
199
+ // still supercompressed (`supercompression !== 'None'`) — a sentinel, not a throw, so a caller falls
200
+ // back to a different asset (or inflates/transcodes first). The caller owns creating/binding the
201
+ // texture (to gl.TEXTURE_2D, gl.TEXTURE_CUBE_MAP, or gl.TEXTURE_2D_ARRAY per the container's shape) and
202
+ // setting sampler/mip state; this uploads only the container's own sub-images.
203
+ //
204
+ // `container.levels` is the flat subresource list in `mip + (face + layer * faces) * mipLevels` order;
205
+ // each flat index is decoded back to (mip, face, layer) so a cubemap's six faces land on
206
+ // gl.TEXTURE_CUBE_MAP_POSITIVE_X + face and an array's layers slice into a gl.TEXTURE_2D_ARRAY. The
207
+ // RGBA decode fallback covers only the plain 2D case (faces === 1, layers === 1); a compressed cubemap
208
+ // or array with no native support reports failure rather than a partial 2D upload.
209
+ export function uploadGlCompressedTextureContainer(gl, container, payload, decode) {
210
+ // A still-wrapped supercompressed payload (Zstd/ZLIB deflate or BasisLZ transcode) is not block data;
211
+ // uploading it as if it were would push corrupt pixels. Fail the sentinel and let the caller inflate
212
+ // or transcode through the deferred seam first.
213
+ if (container.supercompression !== 'None')
214
+ return false;
215
+ const nativeFormat = getGlCompressedTextureFormat(gl, container.format);
216
+ const faces = container.faces;
217
+ const layers = container.layers;
218
+ const mipLevels = container.mipLevels;
219
+ if (nativeFormat !== -1) {
220
+ // An array texture is immutable storage: allocate the whole mip chain × depth once with
221
+ // texStorage3D, then blit each layer's slice into its depth slot (layers are non-contiguous in the
222
+ // layer-major flat list, so per-subresource upload is required; compressedTexImage3D cannot
223
+ // allocate a null store the way the 2D path does).
224
+ if (layers > 1) {
225
+ gl.texStorage3D(gl.TEXTURE_2D_ARRAY, mipLevels, nativeFormat, container.width, container.height, layers);
226
+ }
227
+ for (let index = 0; index < container.levels.length; index += 1) {
228
+ const entry = container.levels[index];
229
+ const view = new Uint8Array(payload.buffer, payload.byteOffset + entry.byteOffset, entry.byteLength);
230
+ const mip = index % mipLevels;
231
+ const faceLayer = (index - mip) / mipLevels;
232
+ const face = faceLayer % faces;
233
+ const layer = (faceLayer - face) / faces;
234
+ if (layers > 1) {
235
+ gl.compressedTexSubImage3D(gl.TEXTURE_2D_ARRAY, mip, 0, 0, layer, entry.width, entry.height, 1, nativeFormat, view);
236
+ }
237
+ else {
238
+ const target = faces === 6 ? gl.TEXTURE_CUBE_MAP_POSITIVE_X + face : gl.TEXTURE_2D;
239
+ gl.compressedTexImage2D(target, mip, nativeFormat, entry.width, entry.height, 0, view);
240
+ }
241
+ }
242
+ return true;
243
+ }
244
+ // RGBA decode fallback: plain 2D only. A cubemap/array with no native block support is not decoded
245
+ // face-by-face here — report failure so the caller supplies a different encoding.
246
+ if (decode === undefined || faces !== 1 || layers !== 1)
247
+ return false;
248
+ for (let mip = 0; mip < container.levels.length; mip += 1) {
249
+ const entry = container.levels[mip];
250
+ const view = new Uint8Array(payload.buffer, payload.byteOffset + entry.byteOffset, entry.byteLength);
251
+ const rgba = decode(container.format, entry.width, entry.height, view);
252
+ if (rgba === null)
253
+ return false;
254
+ gl.texImage2D(gl.TEXTURE_2D, mip, gl.RGBA, entry.width, entry.height, 0, gl.RGBA, gl.UNSIGNED_BYTE, rgba);
255
+ }
256
+ return true;
257
+ }
258
+ function isAstcFormat(format) {
259
+ return format.startsWith('astc');
260
+ }
261
+ // The installed GlCompressedTextureUploader: bridges a compressed ImageResource to the container upload,
262
+ // threading through any registered RGBA decode fallback. Returns false when the resource carries no
263
+ // compressed payload so the display path leaves the texture as-is rather than uploading garbage.
264
+ function uploadGlCompressedImageResource(gl, image, decode) {
265
+ const compressed = image.compressed;
266
+ if (compressed === null)
267
+ return false;
268
+ return uploadGlCompressedTextureContainer(gl, compressed.container, compressed.payload, decode ?? undefined);
269
+ }
270
+ //# sourceMappingURL=glCompressedTexture.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"glCompressedTexture.js","sourceRoot":"","sources":["../src/glCompressedTexture.ts"],"names":[],"mappings":"AASA,OAAO,EAAE,uBAAuB,EAAE,MAAM,iBAAiB,CAAC;AAE1D,sGAAsG;AACtG,sFAAsF;AACtF,gFAAgF;AAChF,oGAAoG;AACpG,+FAA+F;AAC/F,8EAA8E;AAC9E,EAAE;AACF,gGAAgG;AAChG,qGAAqG;AACrG,sGAAsG;AACtG,iGAAiG;AAEjG,0FAA0F;AAC1F,2GAA2G;AAC3G,mGAAmG;AACnG,MAAM,UAAU,gCAAgC,CAAC,EAA0B;IACzE,OAAO;QACL,IAAI,EAAE,EAAE,CAAC,YAAY,CAAC,+BAA+B,CAAC,KAAK,IAAI;QAC/D,IAAI,EAAE,EAAE,CAAC,YAAY,CAAC,8BAA8B,CAAC,KAAK,IAAI;QAC9D,GAAG,EAAE,EAAE,CAAC,YAAY,CAAC,8BAA8B,CAAC,KAAK,IAAI;QAC7D,KAAK,EAAE,EAAE,CAAC,YAAY,CAAC,gCAAgC,CAAC,KAAK,IAAI;QACjE,IAAI,EAAE,EAAE,CAAC,YAAY,CAAC,8BAA8B,CAAC,KAAK,IAAI;QAC9D,IAAI,EACF,EAAE,CAAC,YAAY,CAAC,+BAA+B,CAAC,KAAK,IAAI;YACzD,EAAE,C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AAE,KAAK,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE,CAAC,IAAI,EAAE,EAAE,CAAC,aAAa,EAAE,IAAI,CAAC,CAAC;IAC5G,CAAC;IACD,OAAO,IAAI,CAAC;AACd,CAAC;AAED,SAAS,YAAY,CAAC,MAA8B;IAClD,OAAO,MAAM,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC;AACnC,CAAC;AAED,yGAAyG;AACzG,oGAAoG;AACpG,iGAAiG;AACjG,SAAS,+BAA+B,CACtC,EAA0B,EAC1B,KAA8B,EAC9B,MAAyC;IAEzC,MAAM,UAAU,GAAG,KAAK,CAAC,UAAU,CAAC;IACpC,IAAI,UAAU,KAAK,IAAI;QAAE,OAAO,KAAK,CAAC;IACtC,OAAO,kCAAkC,CAAC,EAAE,EAAE,UAAU,CAAC,SAAS,EAAE,UAAU,CAAC,OAAO,EAAE,MAAM,IAAI,SAAS,CAAC,CAAC;AAC/G,CAAC"}
package/dist/glDraw.d.ts CHANGED
@@ -1,10 +1,15 @@
1
- import type { GlBitmapShader, GlRenderState } from '@flighthq/types';
1
+ import type { GlBitmapShader, GlBlendRealization, GlRenderState, ImageResource, SamplerLike, VideoTexture } from '@flighthq/types';
2
2
  import { BlendMode } from '@flighthq/types';
3
3
  export declare function applyGlBlendMode(state: GlRenderState, blendMode: BlendMode | null): void;
4
- export declare function bindGlTexture(state: GlRenderState, imageSource: CanvasImageSource): WebGLTexture;
4
+ export declare function bindGlImageResourceTexture(state: GlRenderState, image: Readonly<ImageResource>, sampler?: Readonly<SamplerLike> | null): WebGLTexture;
5
+ export declare function bindGlTexture(state: GlRenderState, imageSource: CanvasImageSource, sampler?: Readonly<SamplerLike> | null): WebGLTexture;
6
+ export declare function bindGlVideoTexture(state: GlRenderState, videoTexture: Readonly<VideoTexture>, sampler?: Readonly<SamplerLike> | null): WebGLTexture;
5
7
  export declare function createGlTexture(state: GlRenderState): WebGLTexture;
6
8
  export declare function drawGlQuad(state: GlRenderState, x0: number, y0: number, x1: number, y1: number, u0: number, v0: number, u1: number, v1: number): void;
7
9
  export declare function enableGlBlendModeSupport(state: GlRenderState): void;
10
+ export declare function isBlendModeSupported(state: GlRenderState, blendMode: BlendMode): boolean;
11
+ export declare function registerDefaultGlBlendModes(state: GlRenderState): void;
12
+ export declare function registerGlBlendMode(state: GlRenderState, blendMode: BlendMode, realization: GlBlendRealization): void;
8
13
  export declare function setGlQuadMatrixFromOffset(state: GlRenderState, a: number, b: number, c: number, d: number, tx: number, ty: number, dx: number, dy: number): void;
9
14
  export declare function updateGlTexture(state: GlRenderState, texture: WebGLTexture, canvas: HTMLCanvasElement): void;
10
15
  export declare function useGlProgram(state: GlRenderState, shader?: GlBitmapShader): void;
@@ -1 +1 @@
1
- {"version":3,"file":"glDraw.d.ts","sourceRoot":"","sources":["../src/glDraw.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AACrE,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AA+B5C,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,aAAa,EAAE,SAAS,EAAE,SAAS,GAAG,IAAI,GAAG,IAAI,CAMxF;AAED,wBAAgB,aAAa,CAAC,KAAK,EAAE,aAAa,EAAE,WAAW,EAAE,iBAAiB,GAAG,YAAY,CA2BhG;AAED,wBAAgB,eAAe,CAAC,KAAK,EAAE,aAAa,GAAG,YAAY,CAYlE;AAED,wBAAgB,UAAU,CACxB,KAAK,EAAE,aAAa,EACpB,EAAE,EAAE,MAAM,EACV,EAAE,EAAE,MAAM,EACV,EAAE,EAAE,MAAM,EACV,EAAE,EAAE,MAAM,EACV,EAAE,EAAE,MAAM,EACV,EAAE,EAAE,MAAM,EACV,EAAE,EAAE,MAAM,EACV,EAAE,EAAE,MAAM,GACT,IAAI,CA0BN;AAED,wBAAgB,wBAAwB,CAAC,KAAK,EAAE,aAAa,GAAG,IAAI,CAEnE;AAED,wBAAgB,yBAA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