mirror of
https://github.com/blawar/GLideN64.git
synced 2024-07-04 10:03:36 +00:00
Bind to the current frame buffer FBO when copying auxiliary buffers to
RDRAM
This commit is contained in:
parent
6ee8c71bf0
commit
f5e73a8081
|
@ -22,8 +22,6 @@ using namespace graphics;
|
||||||
|
|
||||||
ColorBufferToRDRAM::ColorBufferToRDRAM()
|
ColorBufferToRDRAM::ColorBufferToRDRAM()
|
||||||
: m_pCurFrameBuffer(nullptr)
|
: m_pCurFrameBuffer(nullptr)
|
||||||
, m_frameCount(-1)
|
|
||||||
, m_startAddress(-1)
|
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -84,6 +82,7 @@ bool ColorBufferToRDRAM::_prepareCopy(u32& _startAddress)
|
||||||
readBuffer = m_pCurFrameBuffer->m_FBO;
|
readBuffer = m_pCurFrameBuffer->m_FBO;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!m_pCurFrameBuffer->isAuxiliary()) {
|
||||||
u32 x0 = 0;
|
u32 x0 = 0;
|
||||||
u32 width;
|
u32 width;
|
||||||
if (config.frameBufferEmulation.nativeResFactor == 0 && m_pCurFrameBuffer->m_scale != 1.0f) {
|
if (config.frameBufferEmulation.nativeResFactor == 0 && m_pCurFrameBuffer->m_scale != 1.0f) {
|
||||||
|
@ -121,9 +120,10 @@ bool ColorBufferToRDRAM::_prepareCopy(u32& _startAddress)
|
||||||
wnd.getDrawer().blitOrCopyTexturedRect(blitParams);
|
wnd.getDrawer().blitOrCopyTexturedRect(blitParams);
|
||||||
|
|
||||||
gfxContext.bindFramebuffer(bufferTarget::READ_FRAMEBUFFER, pBuffer->getColorFbFbo());
|
gfxContext.bindFramebuffer(bufferTarget::READ_FRAMEBUFFER, pBuffer->getColorFbFbo());
|
||||||
|
} else {
|
||||||
|
gfxContext.bindFramebuffer(bufferTarget::READ_FRAMEBUFFER, readBuffer);
|
||||||
|
}
|
||||||
|
|
||||||
m_frameCount = curFrame;
|
|
||||||
m_startAddress = _startAddress;
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -46,8 +46,6 @@ private:
|
||||||
static u32 _RGBAtoRGBA32(u32 _c, u32 x, u32 y);
|
static u32 _RGBAtoRGBA32(u32 _c, u32 x, u32 y);
|
||||||
|
|
||||||
FrameBuffer * m_pCurFrameBuffer;
|
FrameBuffer * m_pCurFrameBuffer;
|
||||||
u32 m_frameCount;
|
|
||||||
u32 m_startAddress;
|
|
||||||
|
|
||||||
static u32 m_blueNoiseIdx;
|
static u32 m_blueNoiseIdx;
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in New Issue
Block a user