directx - CreateBitmapFromDxgiSurface() failed (0x88990003, D2DERR_UNSUPPORTED_OPERATION) -


i want share texture dx11 d2d:

    // dxgi surface version d3d texture.     idxgisurface1* pdxgisurface = nullptr;     auto hresult = irisd3dresourcemanager::instance()->getd3d10device()->opensharedresource(hresourcesharehandle, __uuidof(idxgisurface1), reinterpret_cast<lpvoid*>(&pdxgisurface));     if (failed(hresult)) {         goto failed_release;     }      float fdpix = 0.0f;     float fdpiy = 0.0f;     m_pd2dfactory->getdesktopdpi(&fdpix, &fdpiy);      d2d1_bitmap_properties1 dbbp1;     dbbp1.dpix = fdpix;     dbbp1.dpiy = fdpiy;     dbbp1.pixelformat = d2d1::pixelformat(dxgi_format_b8g8r8a8_unorm, d2d1_alpha_mode_premultiplied);     dbbp1.colorcontext = nullptr;     dbbp1.bitmapoptions = d2d1_bitmap_options_target | d2d1_bitmap_options_cannot_draw;      // create shared id2dbitmap1     id2d1bitmap1* pbitmap = nullptr;             hresult = m_pd2ddevicecontex->createbitmapfromdxgisurface(pdxgisurface, dbbp1, &pbitmap); 

however, createbitmapfromdxgisurface() still returns 0x88990003(d2derr_unsupported_operation) , cannot create shared bitmap.

does know how can work? thanks.


Comments

Popular posts from this blog

Command prompt result in label. Python 2.7 -

javascript - How do I use URL parameters to change link href on page? -

amazon web services - AWS Route53 Trying To Get Site To Resolve To www -