From 216c2ff3aefc9e0295ed9b1486935d65f6c13f55 Mon Sep 17 00:00:00 2001 From: iCatButler Date: Mon, 2 May 2016 15:01:27 +0100 Subject: Fix bugs from previous Fix stray triangles - Switch to full floating point RTPS/RTPT - Clamp w values to near plane Fix texture corruption in 1.78, copy 2.4 Tweak - Remove matrix replacement - Add W component to vertices - Wrap glVertex3fv calls - Use counter to call glVertex4fv for PGXP vertices only --- plugins/peopsxgl/gpu.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'plugins/peopsxgl/gpu.c') diff --git a/plugins/peopsxgl/gpu.c b/plugins/peopsxgl/gpu.c index e38ac48b..2237351d 100755 --- a/plugins/peopsxgl/gpu.c +++ b/plugins/peopsxgl/gpu.c @@ -1222,16 +1222,16 @@ static __inline void XPRIMdrawTexturedQuad(OGLVertex* vertex1, OGLVertex* vertex glBegin(GL_QUAD_STRIP); glTexCoord2fv(&vertex1->sow); - glVertex3fv(&vertex1->x); + PGXP_glVertexfv(&vertex1->x); glTexCoord2fv(&vertex2->sow); - glVertex3fv(&vertex2->x); + PGXP_glVertexfv(&vertex2->x); glTexCoord2fv(&vertex4->sow); - glVertex3fv(&vertex4->x); + PGXP_glVertexfv(&vertex4->x); glTexCoord2fv(&vertex3->sow); - glVertex3fv(&vertex3->x); + PGXP_glVertexfv(&vertex3->x); glEnd(); } @@ -1314,10 +1314,10 @@ void SetScanLines(void) } glLoadIdentity(); - //glOrtho(0,PSXDisplay.DisplayMode.x, - // PSXDisplay.DisplayMode.y, 0, -1, 1); + glOrtho(0,PSXDisplay.DisplayMode.x, + PSXDisplay.DisplayMode.y, 0, -1, 1); - PGXP_SetMatrix(0, PSXDisplay.DisplayMode.x, PSXDisplay.DisplayMode.y, 0, -1, 1); + //PGXP_SetMatrix(0, PSXDisplay.DisplayMode.x, PSXDisplay.DisplayMode.y, 0, -1, 1); if(bKeepRatio) @@ -1892,10 +1892,10 @@ void updateDisplayIfChanged(void) else // some res change? { glLoadIdentity(); - //glOrtho(0,PSXDisplay.DisplayModeNew.x, // -> new psx resolution - // PSXDisplay.DisplayModeNew.y, 0, -1, 1); + glOrtho(0,PSXDisplay.DisplayModeNew.x, // -> new psx resolution + PSXDisplay.DisplayModeNew.y, 0, -1, 1); - PGXP_SetMatrix(0, PSXDisplay.DisplayModeNew.x, PSXDisplay.DisplayModeNew.y, 0, -1, 1); + // PGXP_SetMatrix(0, PSXDisplay.DisplayModeNew.x, PSXDisplay.DisplayModeNew.y, 0, -1, 1); if(bKeepRatio) SetAspectRatio(); -- cgit v1.2.3