locked
directx11 render to texture no data RRS feed

  • Question

  •    i  render to texture1  then use texture render to texture2 but texture2 no  data 

    when  i use  

    g_pd3dDeviceContext->End(cg_pQuery);
     while(g_pd3dDeviceContext->GetData(cg_pQuery,NULL,0,D3D11_ASYNC_GETDATA_DONOTFLUSH) != S_OK)
     {
     }  

    at  every  draw end it work but slowly  

    how to fix this

    Monday, April 2, 2018 8:54 AM

All replies

  • Hi ksdg,

    thanks for posting here.

    >>i  render to texture1  then use texture render to texture2 but texture2 no  data

    Please provide more information about how do you render your texture2.

    Have you tried to use ID3D11DeviceContext::OMSetRenderTargets method to bind multiple render targets?

    Here is a sample document for you as a reference.

    https://msdn.microsoft.com/en-us/library/windows/desktop/dn643746(v=vs.85).aspx

    And also a similar case for you.

    https://stackoverflow.com/questions/12730309/rendering-to-multiple-textures-with-one-pass-in-directx-11

    Hope this could be help of you.

    Best Regards,

    Baron Bi


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    • Proposed as answer by Guido Franzke Tuesday, April 3, 2018 6:56 AM
    Tuesday, April 3, 2018 2:59 AM
  • Hi,

    If your case has been solved, please help to mark answer. If you have any other concerns, just feel free to contact us.

    Your understanding and cooperation will be grateful.

    Best Regards,

    Baron Bi


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Tuesday, April 24, 2018 8:16 AM