Render (Secondary Texture)Viewport with lower framerate

Well I have a viewport in my application, that needs to be renderd only very few times per second.

What would be the correct way to prohibit it from rendering in the normal update process and instead call update manually every xth frame in update()?



Is there a way to do this?

How do you stop the viewport being wiped each time the screen is refreshed?



I guess you’d need to render the viewport into a texture on demand and then use that texture on the display.

Yes, it is rendered into a texture, only that the texture is currently refreshed at each frame.

I assume you’re using the ViewPort.setOutputFrameBuffer() to render the scene to a texture. In that case, you can just keep the viewport disabled most of the time and then enable it when you want it to update (ViewPort.setEnabled()).

1 Like

Thanks, works perfectly now :slight_smile: