Skip to main content
gamedev.net
🔒 Locked

Directx 10 Fullscreen issues

Started by raistlin969 Jul 8, 2008 at 12:03 PM 3 replies 2.8k views
Original Post
raistlin969
raistlin969
Hi, I am in the process of learning Directx 10 and I have been having trouble going from a windowed app to a fullscreen one. I have read that the DXGI layer is supposed to handle this for you if you use alt-enter. So far I have had no luck. I have tried handling the WM_SIZE message and releasing my buffers and then resizing them but this has not worked either. What will happen is the screen will switch to a fullscreen mode but it will just be black, though I do have a cursor. I have tried disabling the alt-enter hook with MakeWindowAssociation and tried to make the switch manually, and have had a little bit of luck, but I have had trouble getting the transition from fullscreen to windowed to work. So far no Directx 10 books talk about fullscreen and I have done quite a bit of searching on the net, but everything that I have found and tried has not worked. I have started to wade through the source code of dxut to try to get an idea. What I am looking for is a set of steps to follow in order to get to fullscreen and back. If anyone can help it would be appreciated. I can post portions of my code but I am at work right now so I do not have that with me. Thanks
Squallc
Squallc
When you created your device did set the flags to DXGI_SWAP_CHAIN_FLAG_ALLOW_MODE_SWITCH ?
raistlin969
raistlin969
Yes I did set that flag. I am really lost as to why it is not working. When I get home tonight I am going to hook up a second monitor to see if I can step through the code as it tries to go to full screen.
Squallc
Squallc
I have a program where the alt-enter works and I did nothing else that seting the flags.
Check if the windowed resolution is compatible with fullscreen ?
Can you post the creation of your device and the render funtion.
raistlin969
raistlin969
Squallc, thanks for responding. I figured out what was wrong when I went to look through my code to post the device creation, and I feel pretty stupid about it. I have been creating a small framework to work with while learning dx10. I have an InitGraphics function that does all of the setup for the window and directx. In that function I call the Init3d function which sets up the device, but my CreateWindow function was also calling the Init3d. So I was basically setting up the device twice. Since I fixed that I can now jump to fullscreen and that makes me happy. Thanks again for helping.

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.