Use a gstate enum, report unhandled blend mode.

This commit is contained in:
Unknown W. Brackets committed 2013-09-14 07:36:43 -07:00
1 parent 1a7e0e40cf
commit 40e3e8e930
3 files changed
+10 -4

No files matched your search

+6 -1
View File
@@ -159,7 +159,7 @@ void TransformDrawEngine::ApplyDrawState(int prim) {
int blendFuncA = gstate.getBlendFuncA();
int blendFuncB = gstate.getBlendFuncB();
int blendFuncEq = gstate.getBlendEq();
GEBlendMode blendFuncEq = gstate.getBlendEq();
if (blendFuncA > GE_SRCBLEND_FIXA) blendFuncA = GE_SRCBLEND_FIXA;
if (blendFuncB > GE_DSTBLEND_FIXB) blendFuncB = GE_DSTBLEND_FIXB;
@@ -225,6 +225,11 @@ void TransformDrawEngine::ApplyDrawState(int prim) {
} else {
glstate.blendFuncSeparate.set(glBlendFuncA, glBlendFuncB, glBlendFuncA, glBlendFuncB);
}
#if !defined(USING_GLES2)
if (blendFuncEq == GE_BLENDMODE_ABSDIFF) {
WARN_LOG_REPORT_ONCE(blendAbsdiff, G3D, "Unsupported absdiff blend mode");
}
#endif
glstate.blendEquation.set(eqLookup[blendFuncEq]);
}