mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-11-18 11:54:30 +01:00
Implement colormask
This commit is contained in:
1 parent
2952588a54
commit
cbf4e5f38c
7 files changed
+50
-59
No files matched your search
@@ -109,7 +109,7 @@ public:
|
||||
GLuint srcCol, srcAlpha, dstCol, dstAlpha;
|
||||
bool logicEnabled;
|
||||
GLuint logicOp;
|
||||
// int maskBits;
|
||||
int colorMask;
|
||||
// uint32_t fixedColor;
|
||||
|
||||
void Apply() {
|
||||
@@ -120,10 +120,8 @@ public:
|
||||
} else {
|
||||
glDisable(GL_BLEND);
|
||||
}
|
||||
glColorMask(GL_TRUE, GL_TRUE, GL_TRUE, GL_TRUE);
|
||||
// glColorMask(maskBits & 1, (maskBits >> 1) & 1, (maskBits >> 2) & 1, (maskBits >> 3) & 1);
|
||||
// glBlendColor(fixedColor);
|
||||
|
||||
glColorMask(colorMask & 1, (colorMask >> 1) & 1, (colorMask >> 2) & 1, (colorMask >> 3) & 1);
|
||||
|
||||
#if !defined(USING_GLES2)
|
||||
if (logicEnabled) {
|
||||
glEnable(GL_COLOR_LOGIC_OP);
|
||||
@@ -755,6 +753,7 @@ BlendState *OpenGLContext::CreateBlendState(const BlendStateDesc &desc) {
|
||||
bs->logicEnabled = desc.logicEnabled;
|
||||
bs->logicOp = logicOpToGL[(int)desc.logicOp];
|
||||
#endif
|
||||
bs->colorMask = desc.colorMask;
|
||||
return bs;
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user