Skip to content

OpenGL: FPS reported by View Frame Time is incorrect due to missing CPU/GPU frame timing information #66464

@Calinou

Description

@Calinou

Godot version

4.0.beta (53d2a9a)

System information

Fedora 36, GeForce GTX 1080 (NVIDIA 515.65.01)

Issue description

The editor uses the CPU/GPU frame timing to estimate the rendered framerate without having to actually render this framerate. This allows the FPS estimate to be accurate even if the actual rendered FPS is capped by V-Sync or other means.

However, when using the OpenGL renderer, this information is always reported as 0 mspf for both CPU and GPU:

2022-09-26_19 41 52

(The editor displays 100000 FPS to avoid a division by zero.)

Since the required features may not be available in OpenGL 3.3, we may have to rely on Engine.get_frames_per_second() instead when using the OpenGL renderer (or Vulkan on MoltenVK).

Steps to reproduce

  • Create a 3D scene in the editor.
  • In the Perspective menu at the top-left corner of the 3D editor viewport, enable View Frame Time.
  • Look at the FPS counter in the top-right corner of the 3D editor viewport.

Minimal reproduction project

N/A

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    Status
    Done

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions