mirror of
https://github.com/scratchfoundation/bgfx.git
synced 2024-11-25 09:08:22 -05:00
Merge branch 'master' of github.com:bkaradzic/bgfx
This commit is contained in:
commit
e5fc0d7a44
1 changed files with 9 additions and 9 deletions
|
@ -939,6 +939,14 @@ namespace bgfx
|
|||
|
||||
void setFrameBuffer(FrameBufferHandle _fbh, bool _msaa = true)
|
||||
{
|
||||
if (isValid(m_fbh)
|
||||
&& m_fbh.idx != _fbh.idx
|
||||
&& m_rtMsaa)
|
||||
{
|
||||
FrameBufferD3D9& frameBuffer = m_frameBuffers[m_fbh.idx];
|
||||
frameBuffer.resolve();
|
||||
}
|
||||
|
||||
if (!isValid(_fbh) )
|
||||
{
|
||||
DX_CHECK(m_device->SetRenderTarget(0, m_backBufferColor) );
|
||||
|
@ -952,7 +960,7 @@ namespace bgfx
|
|||
{
|
||||
const FrameBufferD3D9& frameBuffer = m_frameBuffers[_fbh.idx];
|
||||
|
||||
// If frame buffer has only depth attachement D3DFMT_NULL
|
||||
// If frame buffer has only depth attachment D3DFMT_NULL
|
||||
// render target is created.
|
||||
uint32_t fbnum = bx::uint32_max(1, frameBuffer.m_num);
|
||||
|
||||
|
@ -970,14 +978,6 @@ namespace bgfx
|
|||
DX_CHECK(m_device->SetDepthStencilSurface(NULL != depthStencil ? depthStencil : m_backBufferDepthStencil) );
|
||||
}
|
||||
|
||||
if (isValid(m_fbh)
|
||||
&& m_fbh.idx != _fbh.idx
|
||||
&& m_rtMsaa)
|
||||
{
|
||||
FrameBufferD3D9& frameBuffer = m_frameBuffers[m_fbh.idx];
|
||||
frameBuffer.resolve();
|
||||
}
|
||||
|
||||
m_fbh = _fbh;
|
||||
m_rtMsaa = _msaa;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue