Reputation: 91
I'm trying to get support for a fullscreen borderless window working but none of the information I've found helps.
Regardless of whether or not the window is set as WS_EX_TOPMOST
, the window will always be in exclusive fullscreen mode. I've checked the window styles in games using fullscreen borderless window mode with WinSpy++ and the styles I'm using are identical.
I know it's in exclusive fullscreen mode because WDM stops rendering the little Aero preview thing for my window. I also get that desktop flicker from focusing and unfocusing the window.
The only way I've been able to get a behaviour similar to what I want is by tricking windows into thinking I don't want fullscreen mode. The way I do that is by adjusting the window position by 1px so that it doesn't match the position and size of the screen. This stops Windows from automatically turning on exclusive fullscreen mode.
I know in DirectX the solution to this is simply to create the device with the windowed flag set to true. However, I have never seen anything like that in OpenGL.
Edit as per first comment:
I'm not using any third party library for my windowing, just Win32 and OpenGL.
Edit:
I am using WS_POPUP
as the window style. With this same window style in some DirectX tests I did, I can properly create a fullscreen borderless window or a fullscreen exclusive window by changing the 'windowed' property.
For hardware I'm using a GTX690 with the latest drivers on Win7 x64.
Upvotes: 6
Views: 3859
Reputation: 41
Use PFD_SUPPORT_COMPOSITION
in the PIXELFORMATDESCRIPTOR
of ChoosePixelFormat()
and SetPixelFormat()
.
See The OpenGL Pipeline Newsletter - Volume 003.
Upvotes: 4