Added multiple windows example.

This commit is contained in:
Branimir Karadžić
2014-09-22 19:34:10 -07:00
parent 892262f419
commit de3d152b9c
14 changed files with 849 additions and 108 deletions

View File

@@ -2539,10 +2539,16 @@ namespace bgfx
void FrameBufferD3D9::create(uint16_t _denseIdx, void* _nwh, uint32_t _width, uint32_t _height, TextureFormat::Enum _depthFormat)
{
BX_UNUSED(_width, _height, _depthFormat);
BX_UNUSED(_depthFormat);
m_hwnd = (HWND)_nwh;
DX_CHECK(s_renderD3D9->m_device->CreateAdditionalSwapChain(&s_renderD3D9->m_params, &m_swapChain) );
D3DPRESENT_PARAMETERS params;
memcpy(&params, &s_renderD3D9->m_params, sizeof(D3DPRESENT_PARAMETERS) );
params.BackBufferWidth = _width;
params.BackBufferHeight = _height;
DX_CHECK(s_renderD3D9->m_device->CreateAdditionalSwapChain(&params, &m_swapChain) );
DX_CHECK(m_swapChain->GetBackBuffer(0, D3DBACKBUFFER_TYPE_MONO, &m_color[0]) );
m_colorHandle[0].idx = invalidHandle;
m_depthStencil = NULL;