Jump to content
  • Advertisement
Sign in to follow this  
cyrfer

full screen mode (PC)

This topic is 2714 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

Hi,
I'm wondering 2 things:
1- The reason for better performance in full screen mode? I've read in a few places that this is recommended.
2- How to setup this mode? Is it just a window that is the same size as the desktop? Are there any special flags needed for window creation (Windows, xp, 7) or when rendering with Direct3D or GL?
Thanks!

Share this post


Link to post
Share on other sites
Advertisement
1. It can also be important for the sake of immersion. People are a little more likely to get into your game if they don't see whatever other windows in the background.
2. It depends on what API you are using. Setting up full-screen mode depends on what you are using to do your drawing. There should be plenty of info out there depending on how you are doing things.

Share this post


Link to post
Share on other sites
On Windows you can get increased performance by going into fullscreen. If your Direct3D application is running in a window then the driver must blit (copy) the back buffer to the front buffer. However, in fullscreen mode driver can flip (pointer swap) between the back and front buffer. Obviously a pointer swap is cheaper than a memory copy.

When calling Present on a full-screen application, the swap chain flips (as opposed to blits) the contents of the back buffer to the front buffer. This requires that the swap chain was created using an enumerated display mode (specified in DXGI_SWAP_CHAIN_DESC). If you fail to enumerate display modes, or incorrectly specify the display mode in the description, the swap chain may perform a blit instead. The blit causes an extra stretching copy as well as some increased video memory usage, and is difficult to detect. To avoid this problem, enumerate display modes, and initialize the swap chain description correctly before creating the swap chain. This will ensure maximum performance when flipping in full-screen mode and avoid the extra memory overhead.[/quote]
(source)

Share this post


Link to post
Share on other sites
Also vista and above will boost your thread's priority if you are in d3d fullscreen mode. OpenGL always runs in a window, even it it appears fullscreen to you.

You can get back this thread perf in windowed mode by boosting yoru threads priority yourselfi

To get fullscreen mode In direct3d 8 & 9, you specify windowed = false in the presentparameters struct used in CreateDevice() and Device->Reset().

Share this post


Link to post
Share on other sites
1. I'm interested in the performance differences. I'm guessing there is a performance benefit from a reasons like: the OS will do less work, or the GPU has direct control?
2. I'm asking what are the platform nuances. The documentation is what I'm looking for. I assume there is special flag for window creation on Windows and I want to know if anything is required of the graphics drivers (I doubt anything is required of the driver but you never know...).

Share this post


Link to post
Share on other sites
Thanks Promethium and SimmerD. Those reasons make sense. Now I have a reason to find how to get this working.

Share this post


Link to post
Share on other sites
In D3D, fullscreen is an "exclusive mode". This means that the program has exclusive comtrol over the desktop, which in turn means that because the OS is now aware that nothing else can use the desktop, it should - in theory - be faster. OpenGL doesn't have the concept of an "exclusive mode" (this is consistent with the OpenGL design philosophy where things like this are left to the windowing system to manage) and - as mentioned upthread - a "fullscreen" mode is just a topmost window that's the same dimensions as the desktop (using ChangeDisplaySettings (or equivalent) to switch resolution if desired). I'm not sure if the OpenGL driver model is able to detect that it's running fullscreen and also tell the OS that it should behave as if it's in an exclusive mode, but I'd guess that this would be implementation-dependent so you probably shouldn't rely on it.

In practice, and assuming that fillrate is your bottleneck, an 800x600 (for example) windowed mode will probably always run faster than a fullscreen mode at full desktop resolution. If fillrate isn't your bottleneck then there should really be no difference. So this is application-dependent and - as is normally the case - you really need to know your application and know where it's bottlenecks are before making any definite decision.

Share this post


Link to post
Share on other sites
You can create DirectDraw surface and then use OpenGL on top of it (my experience is outdated so not sure if it is valid anymore, but this one worked flawlessly in older versons of DX).

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.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!