locked
Directx video/image capturing RRS feed

  • Question

  • Good morning , 

    as the title says , I'm having some problems with directx to capture video / image

    first I want a tutorial that teaches how to capture a video or some way to do this..

    second I tried to test it and see if it works by taking a photo

    IDirect3DDevice9 *device;
        IDirect3DSurface9 *surface;
        device->GetBackBuffer(0,0,D3DBACKBUFFER_TYPE_MONO,&surface);
    std::string path1=path.toStdString();
    LPCSTR a=(LPCSTR)path1.c_str();
    
    D3DXSaveSurfaceToFileA(a,D3DXIFF_PNG,surface,NULL,NULL);
    
    surface->Release();

    but it doesn't work , when I run the program and click the button to record it crashes " the slot is the code above " 

    
    

    Tuesday, May 27, 2014 8:13 AM

Answers