Fix fog and stencil buffer clearing. The latter fixes the sky in MotoGP.

This commit is contained in:
Henrik Rydgard committed 2013-01-14 20:44:11 +01:00
1 parent 7d1ddced9f
commit 7271e3fcd5
10 files changed
+120 -46

No files matched your search

+4
View File
@@ -183,6 +183,10 @@ void ApplyDrawState(int prim) {
glstate.stencilOp.set(stencilOps[gstate.stencilop & 0x7], // stencil fail
stencilOps[(gstate.stencilop >> 8) & 0x7], // depth fail
stencilOps[(gstate.stencilop >> 16) & 0x7]);
} else if (gstate.isModeClear()) {
glstate.stencilTest.enable();
glstate.stencilOp.set(GL_REPLACE, GL_REPLACE, GL_REPLACE);
glstate.stencilFunc.set(GL_ALWAYS, 0, 0xFF);
} else {
glstate.stencilTest.disable();
}