Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

Corillian

DX8 newbie question

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

How do you set the resolution and bpp for DX8? I know how for OpenGL, is it the same? I havn''t seen anything related to it in any of the DX8 samples i''ve looked at.

Share this post


Link to post
Share on other sites
Advertisement
When you fill out your D3DPRESENT_PARAMETERS structure, the BackBufferWidth, BackBufferHeight, and BackBufferFormat parameters specify the width, height, and bpp, respectively.



"We are the music makers, and we are the dreamers of the dreams."
- Willy Wonka

Share this post


Link to post
Share on other sites
I''m assuming you want to go full screen, in this example I go into 800x600 mode, 32 bit, this should help:

D3DDISPLAYMODE d3ddm;
d3ddm.Width = 800;
d3ddm.Height = 600;
d3ddm.Format = D3DFMT_A8R8G8B8; // This is bpp in direct graphics, Check the directx help file for more info on that
d3ddm.RefreshRate = 0;

D3DPRESENT_PARAMETERS d3dpp;
ZeroMemory(&d3dpp, sizeof(d3dpp);
d3dpp.Windowed = FALSE;
d3dpp.SwapEffect = D3DSWAPEFFECT_DISCARD; // set to what you want
d3dpp.BackBufferWidth = d3ddm.Width;
d3dpp.BackBufferHeight = d3ddm.Height;
d3dpp.BackBufferFormat = d3ddm.Format;
// rest of code.....

Hope that helped

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!