How can I change the DisplayMode at runtime using Direct3D9?
By using the IDirect3DDevice9::Reset() call you can change your DisplayMode at runtime. You can also use this call to recreate your lost device.Reset() takes a D3DPRESENT_PARAMETERS structure, just like Create Device(), which specifies the desired resolution and presentation settings. If you're restoring a lost device then you can use the same D3DPRESENT_PARAMETERS as when you called CreateDevice() ; You can get D3DPRESENT_PARAMETERS structure from Direct3D (First get a pointer to the swap chain through IDirect3DDevice9::GetSwapChain() , and then use IDirect3DSwapChain9::GetPresentParameters()). However, before Resetting a device: you have to release all D3DPOOL_DEFAULT resources, and then recreate them after calling Reset(). You're also not guaranteed to keep any of your device states (renderstates, texturestates, etc).
FAQ Menu
Sponsored links
Build IT Knowledge with Current & Trusted Content
Helps Employees Develop & Hone New Technical Programming Skills. Sign Up & Get Full Access.
Helps Employees Develop & Hone New Technical Programming Skills. Sign Up & Get Full Access.
Check Out IT Certification Preparation Materials
Sign Up With SkillSoft & Get Access to Training Materials for Over 50 Professional Certifications.
Sign Up With SkillSoft & Get Access to Training Materials for Over 50 Professional Certifications.
Villanova University Six Sigma & IT Certificate Programs
100% Online programs in Six Sigma, IS Security, CISSP Prep, Business Analysis, Proj. Mgmt. and more!
100% Online programs in Six Sigma, IS Security, CISSP Prep, Business Analysis, Proj. Mgmt. and more!
3 Months Free - ASP.NET Web Hosting
3 Months Free & No Setup Fees on ASP.NET 3.5/2.0 Hosting on Windows 2008/2003 Servers ? Click Here!
3 Months Free & No Setup Fees on ASP.NET 3.5/2.0 Hosting on Windows 2008/2003 Servers ? Click Here!
SFTP components for .NET
Add complete SSH and SFTP support to your .NET framework application
Add complete SSH and SFTP support to your .NET framework application
