Jump to content
  • Advertisement


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


DX8 newbie question

This topic is 6303 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
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:

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;

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.

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!