Temporarily disable most of the viewport code as it broke some games. Kept the flip detection.

This commit is contained in:
Henrik Rydgard
2012-11-26 20:38:26 +01:00
parent d8c92caad9
commit 2822ce2737
6 changed files with 128 additions and 110 deletions
+12 -1
View File
@@ -111,8 +111,19 @@ void LinkedShader::use() {
else
{
glUniformMatrix4fv(u_proj, 1, GL_FALSE, gstate.projMatrix);
}
float flippedMatrix[16];
memcpy(flippedMatrix, gstate.projMatrix, 16 * sizeof(float));
if (gstate_c.vpHeight < 0) {
flippedMatrix[5] = -flippedMatrix[5];
flippedMatrix[13] = -flippedMatrix[13];
}
if (gstate_c.vpWidth < 0) {
flippedMatrix[0] = -flippedMatrix[0];
flippedMatrix[12] = -flippedMatrix[12];
}
glUniformMatrix4fv(u_proj, 1, GL_FALSE, flippedMatrix);
}
}
if (u_texenv != -1 && dirtyUniforms & DIRTY_TEXENV) {
glUniform4f(u_texenv, 1.0, 1.0, 1.0, 1.0); // TODO