PLease help - DirectDraw and GAPI on WM6

Last post 01-16-2008, 1:22 PM by PoisonWolfieMan. 0 replies.
Sort Posts: Previous Next
  •  01-16-2008, 1:22 PM

    PLease help - DirectDraw and GAPI on WM6

    On a WM6 device why would DirectDraw and GAPI return different addresses for the screen memory.

    If I use GAPI:

    BYTE * pVideoMemory = (BYTE *)GXBeginDraw();

    then pVideoMemory = 0x51b00000

    but if I use DIRECTDRAW:

    BYTE * pVideoMemory = (BYTE *)ddsd.lpSurface;

    then pVideoMemory = 0x51a00000.

    On a WM5 device the DIRECTDRAW method returns the same address as the GAPI method and my function used to draw to screen works.

    Has it something to do with back buffers....

    The below code is how Iset up my directdraw surface:

    HRESULT hRet;

    hRet = DirectDrawCreate(NULL, &g_pDD, NULL);

     

    // Get exclusive mode

    hRet = g_pDD->SetCooperativeLevel(this->m_hWnd, DDSCL_FULLSCREEN);

    memset(&ddsd, 0, sizeof(ddsd));

    ddsd.dwSize = sizeof(ddsd);

    ddsd.dwFlags = DDSD_CAPS;

    ddsd.ddsCaps.dwCaps = DDSCAPS_PRIMARYSURFACE;

    ddsd.dwBackBufferCount = 1;

     

    hRet = g_pDD->CreateSurface(&ddsd, &g_pDDSPrimary, NULL);

    Thanks for any help,

    Harry

View as RSS news feed in XML
©2007 Microsoft Corporation. All rights reserved. Privacy Statement Terms of Use Code of Conduct Feedback