mirror of
https://github.com/blawar/GLideN64.git
synced 2024-07-02 09:03:37 +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:
parent
393e7a6a26
commit
a8aebe4936
|
@ -193,8 +193,13 @@ void FrameBuffer::init(u32 _address, u32 _endAddress, u16 _format, u16 _size, u1
|
|||
m_width = _width;
|
||||
m_height = _height;
|
||||
m_size = _size;
|
||||
m_scaleX = ogl.getScaleX();
|
||||
m_scaleY = ogl.getScaleY();
|
||||
if (m_width != VI.width && config.frameBufferEmulation.copyAuxToRDRAM != 0) {
|
||||
m_scaleX = 1.0f;
|
||||
m_scaleY = 1.0f;
|
||||
} else {
|
||||
m_scaleX = ogl.getScaleX();
|
||||
m_scaleY = ogl.getScaleY();
|
||||
}
|
||||
m_fillcolor = 0;
|
||||
m_cfb = _cfb;
|
||||
m_needHeightCorrection = _width != VI.width && _width != *REG.VI_WIDTH;
|
||||
|
@ -980,18 +985,18 @@ void FrameBufferToRDRAM::CopyToRDRAM(u32 _address)
|
|||
glBindFramebuffer(GL_READ_FRAMEBUFFER, pBuffer->m_resolveFBO);
|
||||
} else
|
||||
glBindFramebuffer(GL_READ_FRAMEBUFFER, pBuffer->m_FBO);
|
||||
glReadBuffer(GL_COLOR_ATTACHMENT0);
|
||||
glBindFramebuffer(GL_DRAW_FRAMEBUFFER, m_FBO);
|
||||
glScissor(0, 0, pBuffer->m_pTexture->realWidth, pBuffer->m_pTexture->realHeight);
|
||||
glBlitFramebuffer(
|
||||
0, 0, video().getWidth(), video().getHeight(),
|
||||
0, 0, VI.width, VI.height,
|
||||
GL_COLOR_BUFFER_BIT, GL_NEAREST
|
||||
);
|
||||
glBindFramebuffer(GL_DRAW_FRAMEBUFFER, frameBufferList().getCurrent()->m_FBO);
|
||||
|
||||
glBindFramebuffer(GL_READ_FRAMEBUFFER, m_FBO);
|
||||
glReadBuffer(GL_COLOR_ATTACHMENT0);
|
||||
if (pBuffer->m_scaleX > 1.0f) {
|
||||
glBindFramebuffer(GL_DRAW_FRAMEBUFFER, m_FBO);
|
||||
glScissor(0, 0, pBuffer->m_pTexture->realWidth, pBuffer->m_pTexture->realHeight);
|
||||
glBlitFramebuffer(
|
||||
0, 0, video().getWidth(), video().getHeight(),
|
||||
0, 0, VI.width, VI.height,
|
||||
GL_COLOR_BUFFER_BIT, GL_NEAREST
|
||||
);
|
||||
glBindFramebuffer(GL_DRAW_FRAMEBUFFER, frameBufferList().getCurrent()->m_FBO);
|
||||
glBindFramebuffer(GL_READ_FRAMEBUFFER, m_FBO);
|
||||
}
|
||||
#ifndef GLES2
|
||||
// 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.
|
||||
|
|
Loading…
Reference in New Issue
Block a user