Skip to content

Compressed textures: advertise the driver's compressed-texture extens… - #6

Merged
monteslu merged 5 commits into
mainfrom
compressed-textures
Nov 11, 2026
Merged

monteslu merged 5 commits into
mainfrom
compressed-textures

Conversation

@monteslu

Copy link
Copy Markdown
Owner

fixes #5

…ions and fix the compressedTex* uploads

getSupportedExtensions now lists WEBGL_compressed_texture_s3tc, _s3tc_srgb, EXT_texture_compression_bptc and _rgtc, WEBGL_compressed_texture_astc when the driver has them, and WEBGL_compressed_texture_etc always (ETC2 is core in GLES 3.0); getExtension returns their format constants. The four compressedTex* methods passed an extra byte-length argument that native-gles 0.7.1 reads as the data array, so every typed-array upload threw 'Invalid argument'; they now pass (..., format, data).

Tests: test-compressed-textures draws DXT1 blocks read back as red and green through all four uploads (whole arrays, srcOffset/srcLengthOverride, a view with a byteOffset) and checks the extension list against the driver's; test-compressed-threejs draws a three.js CompressedTexture (three r150 or later via THREE_MODULE). Both fail without the fix.
…tall system dependencies' with 'Temporary failure resolving' while GitHub reported no incident)
…test always runs, and a missing or pre-r150 three fails instead of skipping
@monteslu
monteslu merged commit 25bbd75 into main Nov 11, 2026
2 checks passed
@monteslu
monteslu deleted the compressed-textures branch November 11, 2026 17:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Compressed texture support

1 participant