Fullscreen ahoy.
792
0
Advertisement
I just added Fullscreen capability to the D3DApp class. This is done by Pressing the F key. The one issue I noticed with SlimDX is the fact it does not play nice with Alt + Enter D3D10 Default fullscreen switch. Probably due to .Net Forms. No biggie tho very easy to get your own fullscreen switch going. If anyone is interested in how here is the code.
private void m_Window_KeyDown(object sender, KeyEventArgs e) { // When the V-Key is pressed we will force SwapChain to // Present at the Vertical Refresh Rate of our monitor. // Under most circumstances this will be 60 FPS. if (e.KeyCode == Keys.V) { if (m_VSync == 0) { m_VSync = 1; } else { m_VSync = 0; } } else if (e.KeyCode == Keys.F) { if (!fullscreen) { m_SwapChain.SetFullScreenState(true, null); fullscreen = true; OnResize(); } else { m_SwapChain.SetFullScreenState(false, null); fullscreen = false; OnResize(); } } }Advertisement
Advertisement
Advertisement
Discussion