Jump to content
  • Advertisement
Sign in to follow this  
BornToCode

DX11 Fullscreen

This topic is 1565 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

For whatever reason in DX11 using windows 7, i have not test this on window 8 yet. Whenever i go to full screen and then i drag something over the output it automatically kick my app out of full screen. Is there any way i can force it to stay in full screen. I look on several forum and microsoft even mention to change the value of DisableFullScreenWatchDog to anything but 0, but for whatever reason it had no effect. The same thing happens whenever i hit the print screen as well, even though i am setting the MakeWindowAssociation and telling it not to mess with those keys.

 

Share this post


Link to post
Share on other sites
Advertisement

Can you show your code for your MakeWindowAssociation call?  There's one "gotcha" with this call which is not as clearly documented as it should be: you must use the same DXGIFactory as was used (by DXGI, and behind-the-scenes) to create your swapchain when calling MakeWindowAssociation.  The correct way to do this is as follows:

 

IDXGIFactory *pFactory = NULL;

if (SUCCEEDED (SwapChain->GetParent (__uuidof (IDXGIFactory), (void **) &pFactory)))
{
    pFactory->MakeWindowAssociation (hWnd, DXGI_MWA_FLAGS_GO_HERE);
    pFactory->Release ();
}

 

If you're not doing this (e.g perhaps you're creating a new DXGIFactory via CreateDXGIFactory) the MakeWindowAssociation call will have no effect.  From the symptoms you describe this seems at least possible.

Share this post


Link to post
Share on other sites

The window association is now working. This is so weird, that GetParent IDXGIFactory pointer was different than the pointer which i created it with in the first place. Any way do you know what is the reason why the window goes out of fullscreen when it is occluded.

Edited by BornToCode

Share this post


Link to post
Share on other sites

Depending on your MWA flags; there's a flag which instructs DXGI to not manage any window changes or states itself which you may not be using; the downside is that you've now got to manage these yourself in your own program (it's more work but gives you more flexibility).

 

If the behaviour you want is to remain in a fullscreen mode but yet be still able to drag other windows over your program window, you can't have that.  The definition of fullscreen modes is that they have exclusive ownership of the output device, so the two requirements are mutually exclusive.  You'll have to use a "fullscreen windowed mode" instead; i.e a regular windowed mode but sized to your desktop resolution and with no title bar or borders.

Share this post


Link to post
Share on other sites

Depending on your MWA flags; there's a flag which instructs DXGI to not manage any window changes or states itself which you may not be using; the downside is that you've now got to manage these yourself in your own program (it's more work but gives you more flexibility).

 

If the behaviour you want is to remain in a fullscreen mode but yet be still able to drag other windows over your program window, you can't have that.  The definition of fullscreen modes is that they have exclusive ownership of the output device, so the two requirements are mutually exclusive.  You'll have to use a "fullscreen windowed mode" instead; i.e a regular windowed mode but sized to your desktop resolution and with no title bar or borders.

I tried going the other route where i have a full screen borderless window and it works pretty nicely. My only issue is that with DWM disable in window mode, there is alot of tearing happening in window mode, which does not happen in fullscreen since i have exclusive access. With DWM enable i have additional overhead because every time present is called it has to go through that stupid layer before it can present to the screen, since in window mode the desktop is the front buffer. MICROSOFT HHAHHAHAHAHAHAHAH. This is so annoying. One of the thing i notice is that with DWM disable and vsync turn on. Present was always comming back at 16ms which was perfect. with dwm enable Present is all over the place in terms of timing.

Edited by BornToCode

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!