Add context for logicOps

This commit is contained in:
raven02 committed 2013-08-06 16:03:27 +08:00
1 parent f1473ba1fb
commit 5c4af8908e
1 file changed
+13
+13
View File
@@ -200,6 +200,19 @@ void TransformDrawEngine::ApplyDrawState(int prim) {
glstate.blendEquation.set(eqLookup[blendFuncEq]);
}
bool wantLogicOps = !gstate.isModeClear() && gstate.isLogicOpEnabled();
glstate.colorLogicOp.set(wantLogicOps);
if(wantLogicOps) {
GLuint glLogicOp;
int opcode = gstate.getLogicOp();
if (opcode == GE_LOGIC_CLEAR)
glLogicOp = GL_CLEAR;
else if (opcode == GE_LOGIC_AND)
glLogicOp = GL_AND;
//TODO
glstate.logicOp.set(glLogicOp);
}
// Set Dither
if (gstate.isDitherEnabled()) {
glstate.dither.enable();