Archived

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

How Do I Make My App Run At Fullscreen?

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

to go full screen fillout the D3DPRESENT_PARAMETERS struct as such.

obviously set its Windowed member to FALSE, then the BackBufferWidth and BackBufferHeight members will be the vertical and horizontal resolution for it to run at. set the BackBufferFormat to D3DFMT_X8R8G8B8 or one of the other unsigned D3DFORMAT pixel formats. D3DFMT_X8R8G8B8 is for 32 bit color, i recommend that. but read the sdk about this for way more info, its covered thourogly in there. and i know im forgetting/ not cover some stuff. but hopefully now ive given you enough that youll beable to find it and understand it, as there is lots of info in the sdk but its not always easy to find or understand.

Share this post


Link to post
Share on other sites
Ok soit went to fullscreen but started flickering and when i rotate teh object it smudges so i guess its a clearing problem.

My clear command is like this:

g_pD3DDevice->Clear( 0, NULL, D3DCLEAR_TARGET|D3DCLEAR_ZBUFFER, D3DCOLOR_XRGB(0,0,0), 1.0f, 0 );


My Present Parameters are set as so:

D3DPRESENT_PARAMETERS d3dpp;
ZeroMemory( &d3dpp, sizeof(d3dpp) );
d3dpp.BackBufferWidth = 1024;
d3dpp.BackBufferHeight = 768;

d3dpp.Windowed = FALSE;
d3dpp.SwapEffect = D3DSWAPEFFECT_DISCARD;
d3dpp.BackBufferFormat = D3DFMT_A8R8G8B8;
d3dpp.BackBufferCount = 1;
d3dpp.EnableAutoDepthStencil = FALSE;
d3dpp.AutoDepthStencilFormat = D3DFMT_D16;

Hope u can help?

Share this post


Link to post
Share on other sites
lp_D3D = Direct3DCreate9( D3D_SDK_VERSION );
D3DPRESENT_PARAMETERS d3dpp;
ZeroMemory( &d3dpp, sizeof(d3dpp) );
d3dpp.Windowed = false;
d3dpp.SwapEffect =D3DSWAPEFFECT_FLIP;
d3dpp.BackBufferFormat = D3DFMT_A8R8G8B8;
d3dpp.EnableAutoDepthStencil = true;
d3dpp.AutoDepthStencilFormat = D3DFMT_D16;
d3dpp.FullScreen_RefreshRateInHz = D3DPRESENT_RATE_DEFAULT;
d3dpp.PresentationInterval = D3DPRESENT_INTERVAL_DEFAULT ;
d3dpp.BackBufferCount = 1;


d3dpp.BackBufferWidth =1024;
d3dpp.BackBufferHeight=768;



lp_D3D->CreateDevice( D3DADAPTER_DEFAULT, D3DDEVTYPE_HAL, hWnd, D3DCREATE_SOFTWARE_VERTEXPROCESSING, &d3dpp, &lp_Device ) ;


void beginScene(DWORD colour)
{
lp_Device->Clear( 0, NULL, D3DCLEAR_TARGET|D3DCLEAR_ZBUFFER, colour, 1.0f, 0);
lp_Device->BeginScene();
}

void endScene()
{
lp_Device->EndScene();
lp_Device->Present(NULL, NULL, NULL, NULL );
}


[edited by - johnnyBravo on March 26, 2004 7:55:26 PM]

Share this post


Link to post
Share on other sites