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

auxiliary buffers are rendered in native resulution if copyAuxiliary option is enabled

This improves quality. No more need to scale down
This commit is contained in:
purplemarshmallow 2015-10-31 03:27:34 +01:00 committed by Sergey Lipskiy
parent 393e7a6a26
commit a8aebe4936

View File

@ -193,8 +193,13 @@ void FrameBuffer::init(u32 _address, u32 _endAddress, u16 _format, u16 _size, u1
m_width = _width; m_width = _width;
m_height = _height; m_height = _height;
m_size = _size; m_size = _size;
if (m_width != VI.width && config.frameBufferEmulation.copyAuxToRDRAM != 0) {
m_scaleX = 1.0f;
m_scaleY = 1.0f;
} else {
m_scaleX = ogl.getScaleX(); m_scaleX = ogl.getScaleX();
m_scaleY = ogl.getScaleY(); m_scaleY = ogl.getScaleY();
}
m_fillcolor = 0; m_fillcolor = 0;
m_cfb = _cfb; m_cfb = _cfb;
m_needHeightCorrection = _width != VI.width && _width != *REG.VI_WIDTH; m_needHeightCorrection = _width != VI.width && _width != *REG.VI_WIDTH;
@ -980,7 +985,8 @@ void FrameBufferToRDRAM::CopyToRDRAM(u32 _address)
glBindFramebuffer(GL_READ_FRAMEBUFFER, pBuffer->m_resolveFBO); glBindFramebuffer(GL_READ_FRAMEBUFFER, pBuffer->m_resolveFBO);
} else } else
glBindFramebuffer(GL_READ_FRAMEBUFFER, pBuffer->m_FBO); glBindFramebuffer(GL_READ_FRAMEBUFFER, pBuffer->m_FBO);
glReadBuffer(GL_COLOR_ATTACHMENT0);
if (pBuffer->m_scaleX > 1.0f) {
glBindFramebuffer(GL_DRAW_FRAMEBUFFER, m_FBO); glBindFramebuffer(GL_DRAW_FRAMEBUFFER, m_FBO);
glScissor(0, 0, pBuffer->m_pTexture->realWidth, pBuffer->m_pTexture->realHeight); glScissor(0, 0, pBuffer->m_pTexture->realWidth, pBuffer->m_pTexture->realHeight);
glBlitFramebuffer( glBlitFramebuffer(
@ -989,9 +995,8 @@ void FrameBufferToRDRAM::CopyToRDRAM(u32 _address)
GL_COLOR_BUFFER_BIT, GL_NEAREST GL_COLOR_BUFFER_BIT, GL_NEAREST
); );
glBindFramebuffer(GL_DRAW_FRAMEBUFFER, frameBufferList().getCurrent()->m_FBO); glBindFramebuffer(GL_DRAW_FRAMEBUFFER, frameBufferList().getCurrent()->m_FBO);
glBindFramebuffer(GL_READ_FRAMEBUFFER, m_FBO); glBindFramebuffer(GL_READ_FRAMEBUFFER, m_FBO);
glReadBuffer(GL_COLOR_ATTACHMENT0); }
#ifndef GLES2 #ifndef GLES2
// If Sync, read pixels from the buffer, copy them to RDRAM. // If Sync, read pixels from the buffer, copy them to RDRAM.
// If not Sync, read pixels from the buffer, copy pixels from the previous buffer to RDRAM. // If not Sync, read pixels from the buffer, copy pixels from the previous buffer to RDRAM.