Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Exposed physics frame count and idle frame count #35092

Merged
merged 1 commit into from
Jan 14, 2020

Conversation

AndreaCatania
Copy link
Contributor

Exposed:

uint64_t get_physics_frames() const;
uint64_t get_idle_frames() const;

@Calinou
Copy link
Member

Calinou commented Jan 13, 2020

Out of curiosity, what's the difference between get_idle_frames() and the current get_frames_drawn()? Also, it'd be good to regenerate the documentation XML using --doctool . and document the new methods.

That said, thanks for adding get_physics_frames() 🙂

@Xrayez
Copy link
Contributor

Xrayez commented Jan 14, 2020

Ninja'd me, I wanted to create a PR just for this recently but procrastinated. Those are used internally by input actions timestamps, I'm currently working on a proof-of-concept PR for godotengine/godot-proposals#104 so this should help me debug the development via script.

@AndreaCatania
Copy link
Contributor Author

@Calinou frames_draw is advanced each time a frame is renderized: https://github.com/godotengine/godot/blob/master/main/main.cpp#L2035-L2047
If the rendering is disabled it doesn't advance.

While idle_frames (and also physics_frames) are advanced each frame not matter what (and each physics frame).

@akien-mga akien-mga added this to the 3.2 milestone Jan 14, 2020
@akien-mga akien-mga merged commit 870ec61 into godotengine:master Jan 14, 2020
@akien-mga
Copy link
Member

Thanks!

@AndreaCatania AndreaCatania deleted the frames_exp branch January 14, 2020 07:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants