mirror of
https://github.com/libretro/RetroArch
synced 2025-01-30 12:32:52 +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;
|
clipX0 = vp->x;
|
||||||
clipX1 = vp->x + vp->w;
|
clipX1 = vp->x + vp->w;
|
||||||
|
clipY0 = vp->y;
|
||||||
|
clipY1 = vp->y + vp->h;
|
||||||
|
|
||||||
if (rt->yInverted)
|
if (rt->yInverted)
|
||||||
{
|
{
|
||||||
clipY0 = rt->gcmRenderTarget.height - (vp->y + vp->h);
|
clipY0 = rt->gcmRenderTarget.height - (vp->y + vp->h);
|
||||||
clipY1 = rt->gcmRenderTarget.height - vp->y;
|
clipY1 = rt->gcmRenderTarget.height - vp->y;
|
||||||
}
|
}
|
||||||
else
|
|
||||||
{
|
|
||||||
clipY0 = vp->y;
|
|
||||||
clipY1 = vp->y + vp->h;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (clipX0 < 0)
|
if (clipX0 < 0)
|
||||||
clipX0 = 0;
|
clipX0 = 0;
|
||||||
@ -703,17 +700,14 @@ static inline void rglGcmFifoGlViewport(void *data, GLclampf zNear, GLclampf zFa
|
|||||||
// update viewport info
|
// update viewport info
|
||||||
vp->xScale = vp->w * 0.5f;
|
vp->xScale = vp->w * 0.5f;
|
||||||
vp->xCenter = (GLfloat)(vp->x + vp->xScale + RGLGCM_SUBPIXEL_ADJUST);
|
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)
|
if (rt->yInverted)
|
||||||
{
|
{
|
||||||
vp->yScale = vp->h * -0.5f;
|
vp->yScale = vp->h * -0.5f;
|
||||||
vp->yCenter = (GLfloat)(rt->gcmRenderTarget.height - RGLGCM_VIEWPORT_EPSILON - vp->y + vp->yScale + RGLGCM_SUBPIXEL_ADJUST);
|
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]
|
// compute viewport values for hw [no doubles, so we might loose a few lsb]
|
||||||
z_scale = (GLfloat)( 0.5f * ( zFar - zNear ) );
|
z_scale = (GLfloat)( 0.5f * ( zFar - zNear ) );
|
||||||
|
Loading…
x
Reference in New Issue
Block a user