Download

Invoke on Render Thread?

How do I invoke code on the Render Thread?

I see you can sync with the Render Thread via: “FRenderCommandFence” but how do you actually run code on that thread?
I need dispose some native D3D11 resources in a plugin.

I see the macro: “ENQUEUE_UNIQUE_RENDER_COMMAND_ONEPARAMETER” but am not sure how to use it correctly.

Never mind, got it working.

ENQUEUE_UNIQUE_RENDER_COMMAND_ONEPARAMETER(this, MyClass*, MyClass, this,
{
// your render thread code…
});