Skip to content

Commit

Permalink
Update Layer.ts
Browse files Browse the repository at this point in the history
  • Loading branch information
hiddenist authored Dec 14, 2023
1 parent ccd4b89 commit c061702
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions libs/drawing-engine/src/engine/Layer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,13 +46,12 @@ export class Layer {
gl.pixelStorei(gl.UNPACK_FLIP_Y_WEBGL, true)
gl.texImage2D(target, level, internalFormat, srcFormat, srcType, croppedSource)
} else {
const transparentPixels = new Uint8ClampedArray(width * height * 4)
gl.texImage2D(target, level, internalFormat, width, height, border, srcFormat, srcType, transparentPixels)
gl.texImage2D(target, level, internalFormat, width, height, border, srcFormat, srcType, null)
}
gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, gl.LINEAR)
gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_S, gl.CLAMP_TO_EDGE)
gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_T, gl.CLAMP_TO_EDGE)
// gl.bindTexture(gl.TEXTURE_2D, null)
gl.bindTexture(gl.TEXTURE_2D, null)
return texture
}

Expand Down

0 comments on commit c061702

Please sign in to comment.