RenderStats Derived Type

type, public :: RenderStats

A window's frame rate and frame times (see the module documentation). Times are in milliseconds; the rate and frame time are averaged over about half a second, the rest are the last frame's.


Components

Type Visibility Attributes Name Initial
real(kind=wp), public :: acquire_ms = 0.0_wp

waiting for the next image to draw into

real(kind=wp), public :: fps = 0.0_wp

frames per second

real(kind=wp), public :: frame_ms = 0.0_wp

the time between frames

integer(kind=int64), public :: frames = 0_int64

frames drawn

real(kind=wp), public :: gpu_memory_budget = -1.0_wp

device memory available to the program (bytes; -1: unknown)

real(kind=wp), public :: gpu_memory_used = -1.0_wp

device memory in use (bytes; -1: unknown)

real(kind=wp), public :: gpu_ms = -1.0_wp

the GPU's time for a frame (-1: not measured)

integer, public :: height = 0

the image's size (framebuffer pixels)

real(kind=wp), public :: present_ms = 0.0_wp

presenting the image

real(kind=wp), public :: program_ms = 0.0_wp

the program's part of frame(): the scene's update, the handler

real(kind=wp), public :: record_ms = 0.0_wp

recording and submitting the GPU's commands

integer, public :: width = 0

the image's size (framebuffer pixels)


Source Code

    type, public :: RenderStats
        real(wp) :: fps = 0.0_wp                            !! frames per second
        real(wp) :: frame_ms = 0.0_wp                       !! the time between frames
        real(wp) :: program_ms = 0.0_wp                    !! the program's part of frame(): the scene's update, the handler
        real(wp) :: acquire_ms = 0.0_wp                     !! waiting for the next image to draw into
        real(wp) :: record_ms = 0.0_wp                      !! recording and submitting the GPU's commands
        real(wp) :: present_ms = 0.0_wp                     !! presenting the image
        real(wp) :: gpu_ms = -1.0_wp                        !! the GPU's time for a frame (-1: not measured)
        real(wp) :: gpu_memory_used = -1.0_wp               !! device memory in use (bytes; -1: unknown)
        real(wp) :: gpu_memory_budget = -1.0_wp             !! device memory available to the program (bytes; -1: unknown)
        integer(int64) :: frames = 0_int64                  !! frames drawn
        integer :: width = 0, height = 0                    !! the image's size (framebuffer pixels)
    end type RenderStats