Original Post
Hi!
Im in trouble......
When i run my app in windowed mode i get about 1200 fps on my GF4. But when i try to switch to fullscreen fps drops down to 7 !!!!! do you belive it 7!
This is my presentation parameters:
// Width of the back buffer in pixels
d3dpp.BackBufferWidth = bWindowed ? 0 : GAMEAREA_WIDTH;
// Height of the back buffer in pixels
d3dpp.BackBufferHeight = bWindowed ? 0 : GAMEAREA_HEIGHT;
// Back buffer format
d3dpp.BackBufferFormat = bWindowed ? d3ddm.Format : D3DFMT_A8R8G8B8;
// Number of back buffers
d3dpp.BackBufferCount = 1;
// Multisampling type
d3dpp.MultiSampleType = D3DMULTISAMPLE_NONE;
// Swap effect
d3dpp.SwapEffect = D3DSWAPEFFECT_COPY;
// Window handle where rendering ocures
d3dpp.hDeviceWindow = hWndTarget;
// Windowed or fullscreen
d3dpp.Windowed = bWindowed;
// Let Direct3D manage the depth buffer
d3dpp.EnableAutoDepthStencil = TRUE;
// Set the depth buffer format to 16 bits
d3dpp.AutoDepthStencilFormat = D3DFMT_D16;
// Use the default refresh rate available
d3dpp.FullScreen_RefreshRateInHz = 0;
// Present the information as fast as possible
d3dpp.FullScreen_PresentationInterval = bWindowed ? 0 : D3DPRESENT_INTERVAL_IMMEDIATE;
// Allow the back buffer to be accessed for 2D work
d3dpp.Flags = D3DPRESENTFLAG_LOCKABLE_BACKBUFFER;
// Acquire a pointer to IDirect3DDevice8
hResult = g_pD3D->CreateDevice( D3DADAPTER_DEFAULT,
D3DDEVTYPE_HAL,
hWndTarget,
D3DCREATE_SOFTWARE_VERTEXPROCESSING,
&d3dpp,
&g_pD3DDevice );
if( FAILED( hResult ) )
{
OutputDebugString( "Could not create the render device" );
return E_FAIL;
}
Please help me if you see whats wrong.....