Skip to content

Commit

Permalink
opengl: fix color mask
Browse files Browse the repository at this point in the history
  • Loading branch information
slime73 committed Oct 9, 2023
1 parent 06569b4 commit 4787d50
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/modules/graphics/opengl/Graphics.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1567,8 +1567,8 @@ void Graphics::setColorMask(ColorChannelMask mask)
flushBatchedDraws();

uint32 maskbits =
((mask.r ? 1 : 0) << 1) | ((mask.g ? 1 : 0) << 2) |
((mask.g ? 1 : 0) << 3) | ((mask.a ? 1 : 0) << 4);
((mask.r ? 1 : 0) << 0) | ((mask.g ? 1 : 0) << 1) |
((mask.g ? 1 : 0) << 2) | ((mask.a ? 1 : 0) << 3);

gl.setColorWriteMask(maskbits);
states.back().colorMask = mask;
Expand Down

0 comments on commit 4787d50

Please sign in to comment.