@easywasm/gl 0.0.3 → 0.0.4

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 (2) hide show
  1. package/package.json +1 -1
  2. package/web/gl.js +8 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@easywasm/gl",
3
- "version": "0.0.3",
3
+ "version": "0.0.4",
4
4
  "description": "Web host interface exposing GLFW 3.5 to WebAssembly modules compiled with wasi-sdk",
5
5
  "type": "module",
6
6
  "main": "web/index.js",
package/web/gl.js CHANGED
@@ -641,6 +641,14 @@ export class GL {
641
641
  this._gl.texSubImage2D(target, level, xoff, yoff, w, h, format, type, src)
642
642
  }
643
643
 
644
+ glCompressedTexImage2D(target, level, internalFormat, width, height, border, imageSize, dataPtr) {
645
+ this._gl.compressedTexImage2D(target, level, internalFormat, width, height, border, this._bytes(dataPtr, imageSize))
646
+ }
647
+
648
+ glCompressedTexSubImage2D(target, level, xoff, yoff, width, height, format, imageSize, dataPtr) {
649
+ this._gl.compressedTexSubImage2D(target, level, xoff, yoff, width, height, format, this._bytes(dataPtr, imageSize))
650
+ }
651
+
644
652
  glTexParameteri(target, pname, param) { this._gl.texParameteri(target, pname, param) }
645
653
  glTexParameterf(target, pname, param) { this._gl.texParameterf(target, pname, param) }
646
654
  glGenerateMipmap(target) { this._gl.generateMipmap(target) }