How to control the rendering loop's frame interval?

Hi:
I’m writing a native plugin that read out the rendered image from GPU and push it to video output card(DeckLink products), because video output card read data at a certain frame rate and at its own clock, I think I’d better control the rendering loop’s frame interval, the rendering loop should wait for a signal,when the signal arrived unity engine render a frame,and then wait for the signal again;

How can I implement such rendering loop?

There’s a fairly new featured named “on demand rendering” that could help. See this blog post.

MonoBehaviours Update() are each called once per rendered frame so you can flag your plugin for gfx update there perhaps.

Or using coroutine with WaitUntilEndOfFrame you can do that before the physics of the next frame is processed.

Thanks Baste:
I had read this blog, but I think it is not what I need,it looks only reduces the rendering loop frequency, and the rendering loop is still controlled by UnityEngine,but what I need is the control of rendering loop;

Hi:
Can I wait the video output card’s signal in MonoBehaviours Update() ?

Why do you need the two to match?

1 Like

Because my app display the unity rendered image in real time

And?

1 Like