Announcement

Collapse
No announcement yet.

Work with Render Target in separate thread

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Work with Render Target in separate thread

    Hi All! I have some question.
    I write a class, which inherit from FRunnable.
    So I implement some task execution in a separate thread in it.
    Specifically, I would to read from the Render Target resource to the buffer in a separate thread.
    So I call ReadPixels for Render target, but I have error and UE4 crash.
    I clarify that the Render Target pointer I received as RenderTarget = CameraCapture->TextureTarget->GameThread_GetRenderTargetResource();
    I even try to call ReadPixels through AsyncTask, but I have error from compiler. So I don't know what mean [] () in this construction:
    AsyncTask(ENamedThreads::GameThread, [](){
    RenderTarget->ReadPixels(RawPixels);
    });

    How i can call ReadPixels for Render target resource in separate thread?
    Please help!

    #2
    It seems to me that I found the answer to my question here https://answers.unrealengine.com/que...639/index.html.
    Thank you all for your help

    Comment

    Working...
    X