CompressedTexture - noobgl/noobgl GitHub Wiki

The compressed texture allows you to defines gpu-optimized samplers to use from the gpu.

Import

import { CompressedTexture } from "noobgl";

Constructor

new CompressedTexture(context, data);
  • context the WebGL2 context of a canvas.
  • source an array buffer of a WEBGL_compressed_texture_s3tc compressed texture (more informations).
    • DXT1
    • DXT5

Extends

The CompressedTexture class extends the Texture and inherits from all its properties and methods.

Methods

.update()

Update the texture on the gpu from the source.