Do not clear the framebuffer before rendering. Fix scissoring coords.
The framebuffer is cleared by the background plane using global clipping coordinates. This allows multiple rendering to different locations on the framebuffer. Fixes flashing menus in Vanishing Point, loading screens in Test Drive Le Mans and Vigilante 8. Better rear view mirror in Metropolis Street Racer.
This commit is contained in:
parent
97faaaa5b0
commit
3a7a08f3fb
|
@ -1557,11 +1557,11 @@ bool RenderFrame()
|
|||
scissoring_scale_x = 0.5f;
|
||||
scale_x *= 0.5f;
|
||||
}
|
||||
}
|
||||
|
||||
if (SCALER_CTL.hscale)
|
||||
{
|
||||
scale_x*=2;
|
||||
if (SCALER_CTL.hscale)
|
||||
{
|
||||
scale_x*=2;
|
||||
}
|
||||
}
|
||||
|
||||
dc_width *= scale_x;
|
||||
|
@ -1715,18 +1715,14 @@ bool RenderFrame()
|
|||
&& pvrrc.fb_Y_CLIP.min == 0
|
||||
&& (pvrrc.fb_Y_CLIP.max + 1) / scale_y == 480;
|
||||
|
||||
//Color is cleared by the bgp
|
||||
if (wide_screen_on)
|
||||
glcache.ClearColor(pvrrc.verts.head()->col[2]/255.0f,pvrrc.verts.head()->col[1]/255.0f,pvrrc.verts.head()->col[0]/255.0f,1.0f);
|
||||
else
|
||||
glcache.ClearColor(0,0,0,1.0f);
|
||||
//Color is cleared by the background plane
|
||||
|
||||
glcache.Disable(GL_SCISSOR_TEST);
|
||||
|
||||
glcache.DepthMask(GL_TRUE);
|
||||
glClearDepthf(0.0);
|
||||
glStencilMask(0xFF); glCheck();
|
||||
glClear(GL_COLOR_BUFFER_BIT | GL_STENCIL_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); glCheck();
|
||||
glClear(GL_STENCIL_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); glCheck();
|
||||
|
||||
//move vertex to gpu
|
||||
|
||||
|
@ -1762,14 +1758,14 @@ bool RenderFrame()
|
|||
{
|
||||
float width = (pvrrc.fb_X_CLIP.max - pvrrc.fb_X_CLIP.min + 1) / scale_x;
|
||||
float height = (pvrrc.fb_Y_CLIP.max - pvrrc.fb_Y_CLIP.min + 1) / scale_y;
|
||||
int min_x = pvrrc.fb_X_CLIP.min / scale_x;
|
||||
int min_y = pvrrc.fb_Y_CLIP.min / scale_y;
|
||||
float min_x = pvrrc.fb_X_CLIP.min / scale_x;
|
||||
float min_y = pvrrc.fb_Y_CLIP.min / scale_y;
|
||||
if (!is_rtt)
|
||||
{
|
||||
// Add x offset for aspect ratio > 4/3
|
||||
min_x = min_x * dc2s_scale_h + offs_x;
|
||||
// Invert y coordinates when rendering to screen
|
||||
min_y = screen_height - height * dc2s_scale_h;
|
||||
min_y = screen_height - (min_y + height) * dc2s_scale_h;
|
||||
width *= dc2s_scale_h;
|
||||
height *= dc2s_scale_h;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue