FrameRateMeter

from panda3d.core import FrameRateMeter
class FrameRateMeter

Bases: TextNode

This is a special TextNode that automatically updates itself with the current frame rate. It can be placed anywhere in the world where you’d like to see the frame rate.

It also has a special mode in which it may be attached directly to a channel or window. If this is done, it creates a DisplayRegion for itself and renders itself in the upper-right-hand corner.

Inheritance diagram

Inheritance diagram of FrameRateMeter

__init__(*args, **kwargs)
clearWindow()

C++ Interface: clear_window(const FrameRateMeter self)

/**
  • Undoes the effect of a previous call to setup_window().

*/

clear_window()

C++ Interface: clear_window(const FrameRateMeter self)

/**
  • Undoes the effect of a previous call to setup_window().

*/

getClassType()

C++ Interface: get_class_type()

getClockObject()

C++ Interface: get_clock_object(FrameRateMeter self)

/**
  • Returns the clock that is used to determine the frame rate.

*/

getDisplayRegion()

C++ Interface: get_display_region(FrameRateMeter self)

/**
  • Returns the DisplayRegion that the meter has created to render itself into

  • the window to setup_window(), or NULL if setup_window() has not been

  • called.

*/

getTextPattern()

C++ Interface: get_text_pattern(FrameRateMeter self)

/**
  • Returns the sprintf() pattern that is used to format the text.

*/

getUpdateInterval()

C++ Interface: get_update_interval(FrameRateMeter self)

/**
  • Returns the number of seconds that will elapse between updates to the frame

  • rate indication.

*/

getWindow()

C++ Interface: get_window(FrameRateMeter self)

/**
  • Returns the GraphicsOutput that was passed to setup_window(), or NULL if

  • setup_window() has not been called.

*/

get_class_type()

C++ Interface: get_class_type()

get_clock_object()

C++ Interface: get_clock_object(FrameRateMeter self)

/**
  • Returns the clock that is used to determine the frame rate.

*/

get_display_region()

C++ Interface: get_display_region(FrameRateMeter self)

/**
  • Returns the DisplayRegion that the meter has created to render itself into

  • the window to setup_window(), or NULL if setup_window() has not been

  • called.

*/

get_text_pattern()

C++ Interface: get_text_pattern(FrameRateMeter self)

/**
  • Returns the sprintf() pattern that is used to format the text.

*/

get_update_interval()

C++ Interface: get_update_interval(FrameRateMeter self)

/**
  • Returns the number of seconds that will elapse between updates to the frame

  • rate indication.

*/

get_window()

C++ Interface: get_window(FrameRateMeter self)

/**
  • Returns the GraphicsOutput that was passed to setup_window(), or NULL if

  • setup_window() has not been called.

*/

setClockObject()

C++ Interface: set_clock_object(const FrameRateMeter self, ClockObject clock_object)

/**
  • Sets the clock that is used to determine the frame rate. The default is

  • the application’s global clock (ClockObject::get_global_clock()).

*/

setTextPattern()

C++ Interface: set_text_pattern(const FrameRateMeter self, str text_pattern)

/**
  • Sets the sprintf() pattern that is used to format the text. The string

  • “%f” or some variant will be replaced with the current frame rate in frames

  • per second.

*/

setUpdateInterval()

C++ Interface: set_update_interval(const FrameRateMeter self, double update_interval)

/**
  • Specifies the number of seconds that should elapse between updates to the

  • frame rate indication. This should be reasonably slow (e.g. 0.2 to 1.0)

  • so that the calculation of the frame rate text does not itself dominate the

  • frame rate.

*/

set_clock_object()

C++ Interface: set_clock_object(const FrameRateMeter self, ClockObject clock_object)

/**
  • Sets the clock that is used to determine the frame rate. The default is

  • the application’s global clock (ClockObject::get_global_clock()).

*/

set_text_pattern()

C++ Interface: set_text_pattern(const FrameRateMeter self, str text_pattern)

/**
  • Sets the sprintf() pattern that is used to format the text. The string

  • “%f” or some variant will be replaced with the current frame rate in frames

  • per second.

*/

set_update_interval()

C++ Interface: set_update_interval(const FrameRateMeter self, double update_interval)

/**
  • Specifies the number of seconds that should elapse between updates to the

  • frame rate indication. This should be reasonably slow (e.g. 0.2 to 1.0)

  • so that the calculation of the frame rate text does not itself dominate the

  • frame rate.

*/

setupWindow()

C++ Interface: setup_window(const FrameRateMeter self, GraphicsOutput window)

/**
  • Sets up the frame rate meter to create a DisplayRegion to render itself

  • into the indicated window.

*/

setup_window()

C++ Interface: setup_window(const FrameRateMeter self, GraphicsOutput window)

/**
  • Sets up the frame rate meter to create a DisplayRegion to render itself

  • into the indicated window.

*/

update()

C++ Interface: update(const FrameRateMeter self)

/**
  • You can call this to explicitly force the FrameRateMeter to update itself

  • with the latest frame rate information. Normally, it is not necessary to

  • call this explicitly.

*/