Skip to content

Commit

Permalink
WebGL2: Use UNPACK_ALIGNMENT of 1
Browse files Browse the repository at this point in the history
Fixes issues when uploading one or two-channel textures.
  • Loading branch information
magcius committed Dec 30, 2024
1 parent c6d6e35 commit 2012de1
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/gfx/platform/GfxPlatformWebGL2.ts
Original file line number Diff line number Diff line change
Expand Up @@ -566,6 +566,7 @@ class GfxImplP_GL implements GfxSwapChain, GfxDevice {
// We always have depth & stencil test enabled.
gl.enable(gl.DEPTH_TEST);
gl.enable(gl.STENCIL_TEST);
gl.pixelStorei(gl.UNPACK_ALIGNMENT, 1);

this._checkLimits();
this._checkForBugQuirks();
Expand Down

0 comments on commit 2012de1

Please sign in to comment.