Jump to content
Subscribe to GameDev.net Direct to receive the latest updates and exclusive content.
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.
Posted 26 January 2012 - 09:42 AM
Posted 30 January 2012 - 05:29 AM
Posted 30 January 2012 - 09:29 PM
Posted 31 January 2012 - 02:33 AM
Posted 31 January 2012 - 03:25 AM
Do you mean that objects like VertexBuffer, Mesh have to be freed? and then recreated after updating? this can take many time in some cases.
As it was not necessary to do this in MDX, i'm suprising.
Do you have a link?
Posted 31 January 2012 - 05:22 AM
Posted 31 January 2012 - 10:21 AM
Posted 01 February 2012 - 03:38 AM
LPDIRECT3DSURFACE9 rendersurf_old; LPDIRECT3DSURFACE9 depthsurf_old; m_device->GetBackBuffer(0, 0, D3DBACKBUFFER_TYPE_MONO, &rendersurf_old); m_device->GetDepthStencilSurface(&depthsurf_old); rendersurf_old->Release(); depthsurf_old->Release(); RECT rect; GetClientRect(m_hwnd, &rect); int width = rect.right - rect.left; int height = rect.bottom - rect.top; m_d3dpp.BackBufferWidth = m_width = width; m_d3dpp.BackBufferHeight = m_height = height; DXASSERT(m_device->CreateAdditionalSwapChain(&m_d3dpp, &m_swapchain)); DXASSERT(m_swapchain->GetBackBuffer(0, D3DBACKBUFFER_TYPE_MONO, &m_rendersurface)); DXASSERT(m_device->CreateDepthStencilSurface(m_width, m_height, m_d3dpp.AutoDepthStencilFormat, m_d3dpp.MultiSampleType, m_d3dpp.MultiSampleQuality, TRUE, &m_depthsurface, 0));
Posted 01 February 2012 - 04:12 AM
Posted 01 February 2012 - 04:36 AM
Thanks your code, which is in native C++. With SlimDX (and also SharpDX and MDX) which are managed frameworks desgned to used with .Net languages (C#, C++ managed, VB,...), not all the methods of Direct3D9 are exposed, and notably CreateAdditionalSwapChain().
So, i started to use the "traditional" way: disposing ressources that must be disposed, reseting device, recreate resources. The first results seems sufficient, but this takes more time to code and the execution is probably slower. Anyway, i think that i have no other choice.
Posted 03 February 2012 - 09:26 AM
GameDev.net™, the GameDev.net logo, and GDNet™ are trademarks of GameDev.net, LLC.