Jump to content
  • Advertisement
Sign in to follow this  

full screen render

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

My 3d game runs ok in window mode but when I try to render it in full screen, I just get a black screen. This is the code I am uising which is taken from an example from tom millers book, directx kick start, he was rendering animated sprites , but it said in the book the same setup should work for a 3d sceen. code PresentParameters presentParams = new PresentParameters(); presentParams.SwapEffect = SwapEffect.Discard; // Start up full screen Format current = Manager.Adapters[0].CurrentDisplayMode.Format; if (Manager.CheckDeviceType(0, DeviceType.Hardware, current, current, false)) { // this is valid presentParams.Windowed = false; presentParams.BackBufferFormat = current; presentParams.BackBufferWidth = ScreenWidth; presentParams.BackBufferHeight = ScreenHeight; } else { presentParams.Windowed = true; } // Create our device device = new Device(0, DeviceType.Hardware, this, CreateFlags.SoftwareVertexProcessing, presentParams);

Share this post

Link to post
Share on other sites
this is what i have

PresentParameters presentParams = new PresentParameters();
presentParams.Windowed = false;
presentParams.DeviceWindow = this;
presentParams.BackBufferFormat = Format.X8R8G8B8;
presentParams.BackBufferHeight = 768;
presentParams.BackBufferWidth = 1024;
presentParams.PresentationInterval = PresentInterval.Immediate;//Default;
presentParams.SwapEffect = SwapEffect.Flip;//Discard;
presentParams.AutoDepthStencilFormat = DepthFormat.D24S8;
presentParams.EnableAutoDepthStencil = true;

i have the managed directx game programming by tom miller aswell. I think i remember having problems with that code aswell.

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!