+1 vote

Is there a proper way to request ONE update from an Viewport by code if Update Mode is set to Never or Once ?
I am using it to render to a texture (just in case that matters).

Calling set_render_target_update_mode(Viewport.RENDER_TARGET_UPDATE_ONCE) when an update is required works but it doesn't feel like this is the intended way.

in Engine by (121 points)
edited by

1 Answer

+1 vote
Best answer

It is strange, but it appears that's all there is. The updates to the viewport seem to be called internally. The only thing available to script to access them is the update mode method.

by (5,242 points)
selected by

I did read the source and luckily
the viewportsetrendertargetupdate_mode source isn't much overhead assuming viewport->update_list.in_list() is quite fast.

Anyway i will poke the devs on irc to add an update function to the viewport

Was going to say, it might make for a good feature request.

Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to webmaster@godotengine.org with your username.