You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
this.generateWebGLTexture = function (gl, preserveSource) {
...
// Loop through each mip level of compressed texture data provided and upload it to the given texture.
for (var i = 0; i < this.levels; ++i) {
// Determine how big this level of compressed texture data is in bytes.
var levelSize = textureLevelSize(this.internalFormat, width, height);
// Get a view of the bytes for this level of DXT data.
var dxtLevel = new Uint8Array(this.data.buffer, this.data.byteOffset + offset, levelSize);
// Upload!
gl.compressedTexImage2D(gl.TEXTURE_2D, i, this.internalFormat, width, height, 0, dxtLevel);
...
};
How can I get the correct compressed data from javascript?
Thanks!
The text was updated successfully, but these errors were encountered:
sleep2death
changed the title
bing gl.compressTexImage2D
binding gl.compressTexImage2D
Aug 16, 2016
Hi Dominic,
I've decided to bind the 'gl.compressTexImage2D' function which was marked as
EJ_BIND_FUNCTION_NOT_IMPLEMENTED
, and this is my implement:I use pixi-compressed-textures to upload the compressed texture, it handled the mipmap already:
How can I get the correct compressed data from javascript?
Thanks!
The text was updated successfully, but these errors were encountered: