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

full screen issues

Last post 23/10/2009 15:51 by TordinBjorn. 1 replies.
  • 21/10/2009 21:40

    full screen issues

    A fantastic issue that im not sure how to solve

    I have a standard WINAPI window, standard DX10 init code, that works in windowed perfectly.

    as soon as i tried to run it full screen it crashes but stays full screen, the only way for me to escape it is to cntrl-alt-del and close visual studio down.

    and i do have the postquitemessage(0); tied to the escape key


    here is my desc
    // Create the clear the DXGI_SWAP_CHAIN_DESC structure
    DXGI_SWAP_CHAIN_DESC swapChainDesc;
    ZeroMemory(&swapChainDesc, sizeof(swapChainDesc));


    // Fill in the needed values
    swapChainDesc.BufferCount = 1;
    swapChainDesc.BufferDesc.Width = WIDTH;
    swapChainDesc.BufferDesc.Height = HEIGHT;
    swapChainDesc.BufferDesc.Format = DXGI_FORMAT_R8G8B8A8_UNORM;
    //swapChainDesc.BufferDesc.ScanlineOrdering = DXGI_MODE_SCANLINE_ORDER_UNSPECIFIED;
    //swapChainDesc.BufferDesc.Scaling = DXGI_MODE_SCALING_UNSPECIFIED;
    swapChainDesc.BufferDesc.RefreshRate.Numerator = 60;
    swapChainDesc.BufferDesc.RefreshRate.Denominator = 1;
    swapChainDesc.BufferUsage = DXGI_USAGE_RENDER_TARGET_OUTPUT;
    swapChainDesc.OutputWindow = hWnd;
    swapChainDesc.SampleDesc.Count = 1;
    swapChainDesc.SampleDesc.Quality = 0;
    //swapChainDesc.SwapEffect = DXGI_SWAP_EFFECT_DISCARD;
    swapChainDesc.Windowed = false;

    .......

    // create and set the viewport
    D3D10_VIEWPORT vp;

    vp.Width = WIDTH;
    vp.Height = HEIGHT;
    vp.MinDepth = 0.0f;
    vp.MaxDepth = 1.0f;
    vp.TopLeftX = 0;
    vp.TopLeftY = 0;

    pD3DDevice->RSSetViewports(1, &vp);

                // Create the projection matrix based on the viewport
        //D3DXMatrixOrthoOffCenterLH(    &g_matProjection,
        //                            (float)vp.TopLeftX,
        //                            (float)vp.Width,
        //                            (float)vp.TopLeftY,
        //                            (float)vp.Height,
        //                            0.1f,
        //                            10);

    I presume it has to be in there somewhere, ive commented out some of the stuff that i added in later.

    any help would be had

    regards
    Sarriss
  • 23/10/2009 15:51 In reply to

    Re: full screen issues

    Hey! i hade the same issue!
    and i dont know what causing it or why it occurs! but what solved my problem was not to do a release of the Viewport!
    this might sound wierd! but i actualy helpt me!
    Whow, thats a big memory leak...
    It sure is! and we are sinking!

    kartflygaren675@hotmail.com
Page 1 of 1 (2 items) Previous Next