Jump to content
  • Advertisement
Sign in to follow this  
Nene

Black screen if I change resolution

This topic is 2971 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 trying to create a D3DDevice using a lower resolution than the one of my display screen, and the window goes black (only in fullscreen):


...

mD3DParams.BackBufferWidth = 800;
mD3DParams.BackBufferHeight = 600;
mD3DParams.BackBufferFormat = D3DFMT_X8R8G8B8;
mD3DParams.BackBufferCount = 1;
mD3DParams.MultiSampleType = D3DMULTISAMPLE_NONE;
mD3DParams.MultiSampleQuality = 0;
mD3DParams.SwapEffect = D3DSWAPEFFECT_DISCARD;
mD3DParams.hDeviceWindow = hWnd;
mD3DParams.Windowed = false;
mD3DParams.EnableAutoDepthStencil = true;
mD3DParams.AutoDepthStencilFormat = true;
mD3DParams.Flags = 0;
mD3DParams.FullScreen_RefreshRateInHz = D3DPRESENT_RATE_DEFAULT;
mD3DParams.PresentationInterval = D3DPRESENT_INTERVAL_IMMEDIATE;

hr = g_pD3D->CreateDevice( D3DADAPTER_DEFAULT, D3DDEVTYPE_HAL, hWnd,
D3DCREATE_SOFTWARE_VERTEXPROCESSING,
&d3dpp, &g_pd3dDevice );



If I set the back buffer dimmensions to match my display screen (1280x1024) then it works... Even, the Present call crashes sometimes.

Do you know why? I've tried it on several computers and the same black screen..

Please

Share this post


Link to post
Share on other sites
Advertisement
What do the Debug Runtimes say?

And once you Reset() a device, it gets put into the same state as it was just after you create it - I.e. you need to set up all your materials, transforms, etc again.

Share this post


Link to post
Share on other sites
Yes I know I'm following all the steps required before and after resetting a device. The reset process works perfectly when the device is lost using ALT+TAB.

The direct3d debug does not say anything...

I have the same problem with other games, and I know people that have windows 7 as well, and they have the same black screen...

Share this post


Link to post
Share on other sites
Quote:
Original post by Nene
The direct3d debug does not say anything...
As in there's no output at all, or no warnings or errors?

Quote:
Original post by Nene
I have the same problem with other games, and I know people that have windows 7 as well, and they have the same black screen...
If you get this with the SDK samples, then it's probably a problem with your graphics card and/or driver.

Share this post


Link to post
Share on other sites
I'll try to update my graphics card drivers.. However the same happens to my computer's friend, using windows 7 but with another graphics cards, strange..
Thanks!

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!