summaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
authoriCatButler <i.am.catbutler@gmail.com>2016-05-06 17:12:31 +0100
committeriCatButler <i.am.catbutler@gmail.com>2016-05-06 17:12:31 +0100
commitca61b53f6c99e49de4620395bc8dbe5b71c9e2db (patch)
treeff573393e15c8eb343d499c637c4bc846419024e /plugins
parent4b706847d4ffbaa72b2d2a39130f71b0d2a401b6 (diff)
downloadpcsxr-ca61b53f6c99e49de4620395bc8dbe5b71c9e2db.tar.gz
More fixes for persective correct build
- Switch back to fixed point GTE - Only clamp w to h/2 after divide - Fix vertex function for multi-pass (was overwriting vertexon first pass)
Diffstat (limited to 'plugins')
-rw-r--r--plugins/peopsxgl/pgxp_gpu.c23
1 files changed, 13 insertions, 10 deletions
diff --git a/plugins/peopsxgl/pgxp_gpu.c b/plugins/peopsxgl/pgxp_gpu.c
index 67b381d8..e8191e48 100644
--- a/plugins/peopsxgl/pgxp_gpu.c
+++ b/plugins/peopsxgl/pgxp_gpu.c
@@ -106,22 +106,25 @@ void PGXP_SetMatrix(float left, float right, float bottom, float top, float zNea
void PGXP_glVertexfv(GLfloat* pV)
{
// If there are PGXP vertices expected
- if (vertexIdx < numVertices)
- {
+ //if (vertexIdx < numVertices)
+ //{
+ float temp[4];
+ memcpy(temp, pV, sizeof(float) * 4);
+
// pre-multiply each element by w (to negate perspective divide)
for (unsigned int i = 0; i < 3; i++)
- pV[i] *= pV[3];
+ temp[i] *= temp[3];
// pass complete vertex to OpenGL
- glVertex4fv(pV);
+ glVertex4fv(temp);
vertexIdx++;
- pV[3] = 1.f;
- }
- else
- {
- glVertex3fv(pV);
- }
+ // pV[3] = 1.f;
+ //}
+ //else
+ //{
+ // glVertex3fv(pV);
+ //}
}
// Get parallel vertex values