WPF Fullscreen [SharpDX / SlimDX]

Started by
3 comments, last by Dynamo_Maestro 11 years, 6 months ago
Hi

Lets take either DX10 WPF example from the samples of SharpDX / SlimDX, how would I be able to go in fullscreen.in them the same way I can in a windows form app?

In a WinForm app If I were to change "IsWindowed", to false in SwapChainDescription, even though things get rendered horribly there is some success in fullscreen, now I understand theres more to do to get it rendered correct but there is some rendering, enough for me to know the image is getting rendered (just not the right size etc), however in WPF im completely lost as all I get is a black screen when in fullscreen mode.

I am not really sure what my approach should be tbh, should my fullscreen changes occur in DXImageSource or from the SwapChain thats created with my device, I messed about with both and didnt get any success.
Advertisement
I don't think that WPF is supporting fullscreen mode with full control of the output monitor handled by DXGI swap chain as it can be done with WinForm. The only thing that you could do is probably to fake WPF form to look like a fullscreen app, like this. Also, when operating with WPF, you usually don't use a swap chain, as the process of copying/surface sharing with d3d9 is not using it.

I don't think that WPF is supporting fullscreen mode with full control of the output monitor handled by DXGI swap chain as it can be done with WinForm. The only thing that you could do is probably to fake WPF form to look like a fullscreen app, like this. Also, when operating with WPF, you usually don't use a swap chain, as the process of copying/surface sharing with d3d9 is not using it.


I was worried about this, SwapChain wasnt really something I was concerned with until today mainly for the fullscreen issue :D. Honestly my attempt at getting fullscreen resulted in some really messy bugs in DXImageSource after a while.

However I did find this earlier http://jmorrill.hjtcentral.com/Home/tabid/428/EntryId/438/How-to-get-access-to-WPF-s-internal-Direct3D-guts.aspx
I have only briefly looked at the code and havent really bothered much with it, but it may have some potential


Since this topic is up I have another question, the fullscreen method I use at present is very similiar to the one in your link, same results different methods, it acts much like Windows Mode [Fixed] in games and is really decent but I often wonder the real difference between playing games in Fullscreen mode / Windows Mode [Fixed] or Windows Mode in general, now this may just be me but I find Fullscreen to look better though I have never actually known why. In terms of quality do games 'look' better when in fullscreen?

Since this topic is up I have another question, the fullscreen method I use at present is very similiar to the one in your link, same results different methods, it acts much like Windows Mode [Fixed] in games and is really decent but I often wonder the real difference between playing games in Fullscreen mode / Windows Mode [Fixed] or Windows Mode in general, now this may just be me but I find Fullscreen to look better though I have never actually known why. In terms of quality do games 'look' better when in fullscreen?

I'm not aware about a quality improvement when a backbuffer goes to fullscreen (apart from some color correction that could be applied in fullscreen differently by the gfx card?, not sure). The main difference is that for a plain window there is a copy (a blit) from the back buffer to the front buffer while in fullscreen mode, it is just a flip (see msdn doc about DXGI), plus the fact that the surface will go through Windows Manager composition, so It is usually slower and you can have less guarantee on the FPS/vsync in Window mode.
Cool, thanks for the helpful quick replies :)

This topic is closed to new replies.

Advertisement