-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixed a stupid issue where GameCube models actually aren't meant to u…
…pdate the alpha channel.
- Loading branch information
1 parent
57b761a
commit 55c9fd0
Showing
6 changed files
with
41 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
28 changes: 28 additions & 0 deletions
28
FinModelUtility/Fin/Fin.Ui/src/rendering/gl/util/GlUtil_Channel.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
using System.Runtime.CompilerServices; | ||
|
||
using OpenTK.Graphics.OpenGL; | ||
|
||
namespace fin.ui.rendering.gl; | ||
|
||
public partial class GlState { | ||
public bool UpdateColorChannel { get; set; } = true; | ||
public bool UpdateAlphaChannel { get; set; } = true; | ||
} | ||
|
||
public static partial class GlUtil { | ||
[MethodImpl(MethodImplOptions.AggressiveInlining)] | ||
public static void SetChannelUpdateMask(bool updateColorChannel, | ||
bool updateAlphaChannel) { | ||
if (GlUtil.currentState_.UpdateColorChannel == updateColorChannel && | ||
GlUtil.currentState_.UpdateAlphaChannel == updateAlphaChannel) { | ||
return; | ||
} | ||
|
||
GlUtil.currentState_.UpdateColorChannel = updateColorChannel; | ||
GlUtil.currentState_.UpdateAlphaChannel = updateAlphaChannel; | ||
GL.ColorMask(updateColorChannel, | ||
updateColorChannel, | ||
updateColorChannel, | ||
updateAlphaChannel); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters