Archived

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

Corillian

DX8 newbie question

Recommended Posts

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