xboxscene.org forums

Author Topic: Simple Question  (Read 34 times)

Instigator

  • Archived User
  • Newbie
  • *
  • Posts: 30
Simple Question
« on: February 29, 2004, 03:28:00 PM »

CODE

void Render(char *imageFile)
{
    IDirect3DSurface8* pBackBuffer = NULL;
    g_pd3dDevice->GetBackBuffer(0, D3DBACKBUFFER_TYPE_MONO, &pBackBuffer);

    D3DXLoadSurfaceFromFile(
        pBackBuffer,
        NULL,
        NULL,
        imageFile
        NULL,
        D3DX_DEFAULT,
        0,
        NULL);

    g_pd3dDevice->Present(NULL, NULL, NULL, NULL);

    if (pBackBuffer)
        pBackBuffer->Release();
}


It should give you the basic mechanics of loading and displaying a file.  If you want more information, you can pickup just about any Direct3D book and use it as a reference.
Logged