mirror of
https://github.com/libretro/RetroArch.git
synced 2025-01-21 00:05:30 +00:00
(RGL PS3) Cleanup rglGcmFifoGlViewport
This commit is contained in:
parent
7397d8ff4a
commit
32604f0aa3
@ -674,17 +674,14 @@ static inline void rglGcmFifoGlViewport(void *data, GLclampf zNear, GLclampf zFa
|
||||
|
||||
clipX0 = vp->x;
|
||||
clipX1 = vp->x + vp->w;
|
||||
clipY0 = vp->y;
|
||||
clipY1 = vp->y + vp->h;
|
||||
|
||||
if (rt->yInverted)
|
||||
{
|
||||
clipY0 = rt->gcmRenderTarget.height - (vp->y + vp->h);
|
||||
clipY1 = rt->gcmRenderTarget.height - vp->y;
|
||||
}
|
||||
else
|
||||
{
|
||||
clipY0 = vp->y;
|
||||
clipY1 = vp->y + vp->h;
|
||||
}
|
||||
|
||||
if (clipX0 < 0)
|
||||
clipX0 = 0;
|
||||
@ -703,17 +700,14 @@ static inline void rglGcmFifoGlViewport(void *data, GLclampf zNear, GLclampf zFa
|
||||
// update viewport info
|
||||
vp->xScale = vp->w * 0.5f;
|
||||
vp->xCenter = (GLfloat)(vp->x + vp->xScale + RGLGCM_SUBPIXEL_ADJUST);
|
||||
vp->yScale = vp->h * 0.5f;
|
||||
vp->yCenter = (GLfloat)(vp->y + vp->yScale + RGLGCM_SUBPIXEL_ADJUST);
|
||||
|
||||
if (rt->yInverted)
|
||||
{
|
||||
vp->yScale = vp->h * -0.5f;
|
||||
vp->yCenter = (GLfloat)(rt->gcmRenderTarget.height - RGLGCM_VIEWPORT_EPSILON - vp->y + vp->yScale + RGLGCM_SUBPIXEL_ADJUST);
|
||||
}
|
||||
else
|
||||
{
|
||||
vp->yScale = vp->h * 0.5f;
|
||||
vp->yCenter = (GLfloat)(vp->y + vp->yScale + RGLGCM_SUBPIXEL_ADJUST);
|
||||
}
|
||||
|
||||
// compute viewport values for hw [no doubles, so we might loose a few lsb]
|
||||
z_scale = (GLfloat)( 0.5f * ( zFar - zNear ) );
|
||||
|
Loading…
x
Reference in New Issue
Block a user