1
0
mirror of https://github.com/blawar/GLideN64.git synced 2024-07-04 10:03:36 +00:00

Frame buffer emulation fixes:

clear color buffer when size is changed but address is the same.
This commit is contained in:
Sergey Lipskiy 2013-06-29 18:51:06 +07:00
parent 4fa08bd906
commit 7418f76968
2 changed files with 10 additions and 2 deletions

View File

@ -167,7 +167,7 @@ void FrameBuffer_SaveBuffer( u32 address, u16 format, u16 size, u16 width, u16 h
if ((current->startAddress != address) ||
(current->width != width) ||
//(current->height != height) ||
(current->size != size) || // TODO FIX ME
//(current->size != size) || // TODO FIX ME
(current->scaleX != OGL.scaleX) ||
(current->scaleY != OGL.scaleY))
{
@ -178,6 +178,14 @@ void FrameBuffer_SaveBuffer( u32 address, u16 format, u16 size, u16 width, u16 h
FrameBuffer_MoveToTop( current );
ogl_glBindFramebuffer(GL_DRAW_FRAMEBUFFER, current->fbo);
if (current->size != size) {
f32 fillColor[4];
gDPGetFillColor(fillColor);
OGL_ClearColorBuffer(fillColor);
current->size = size;
current->texture->format = format;
current->texture->size = size;
}
break;
}
current = current->lower;

View File

@ -347,7 +347,7 @@ void gDPSetColorImage( u32 format, u32 size, u32 width, u32 address )
}*/
address = RSP_SegmentToPhysical( address );
if (gDP.colorImage.address != address || gDP.colorImage.width != width)
if (gDP.colorImage.address != address || gDP.colorImage.width != width || gDP.colorImage.size != size)
{
if (width == VI.width) {
if (width == gSP.viewport.width)