XNA Creators Club Online
Page 1 of 1 (5 items)
Sort Posts: Previous Next

d3dpp.Windowed Can't change to false

Last post 05-16-2008 3:06 PM by Ralf Kornmann. 4 replies.
  • 05-12-2008 4:26 PM

    d3dpp.Windowed Can't change to false

    I've just started rebuilding my graphics engine and in order to test the different resolutions I need to make it fullscreen, but when I change d3dpp.Windowed to FALSE Visual Studio tells me the program's triggered a breakpoint (Which I didn't set).

    The dialog says: Program.exe has triggered a breakpoint and asks me to break or continue.

    Here's the DX debug log.

    Direct3D9: (ERROR) :Invalid value for BackBufferFormat. ValidatePresentParameters fails.

    D3D9 Helper: IDirect3D9::CreateDevice failed: D3DERR_INVALIDCALL

    Direct3D9: (INFO) :MemFini!

    Direct3D9: (WARN) :Memory still allocated! Alloc count = 5

    Direct3D9: (WARN) :Current Process (pid) = 00000554

    Program.exe has triggered a breakpoint

    Direct3D9: (WARN) :Memory Address: 003654e8 lAllocID=1 dwSize=000047f8, (pid=00000554)

    Direct3D9: (WARN) : Stack Back Trace

     

    Any ideas on how to fix this?

  • 05-12-2008 4:36 PM In reply to

    Re: d3dpp.Windowed Can't change to false

    Answer

    From the error you posted it seems that your d3dpp doesn’t contain a valid back buffer format. In comparison to the window mode you need to set a back buffer format.

  • 05-15-2008 4:42 PM In reply to

    Re: d3dpp.Windowed Can't change to false

    OK it worked great thanks. Just in case anyone else has this problem, I this is the PRESENTPARAMS function I used;

        D3DPRESENT_PARAMETERS d3dpp;
        ZeroMemory(&d3dpp, sizeof(d3dpp));
        d3dpp.Windowed = FALSE;
        d3dpp.SwapEffect = D3DSWAPEFFECT_DISCARD;
        d3dpp.hDeviceWindow = hWnd;
        d3dpp.BackBufferFormat = D3DFMT_X8R8G8B8;
        d3dpp.BackBufferWidth = 800;
        d3dpp.BackBufferHeight = 600;

  • 05-16-2008 2:54 PM In reply to

    Re: d3dpp.Windowed Can't change to false

    You should set pp.BackBufferCount to at least 1 (for double buffering).

  • 05-16-2008 3:06 PM In reply to

    Re: d3dpp.Windowed Can't change to false

    Zero is equal to 1 when it comes to back buffer count.

Page 1 of 1 (5 items) Previous Next
var gDomain='m.webtrends.com'; var gDcsId='dcschd84w10000w4lw9hcqmsz_8n3x'; var gTrackEvents=1; var gFpc='WT_FPC'; /*<\/scr"+"ipt>");} /*]]>*/
DCSIMG