mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-03 18:31:55 -04:00
fix initialization bug; add minor interfaces
This commit is contained in:
parent
8f06d9e0d3
commit
4b58cb8500
@ -101,6 +101,7 @@ get_text_pattern() const {
|
||||
INLINE void FrameRateMeter::
|
||||
set_clock_object(ClockObject *clock_object) {
|
||||
_clock_object = clock_object;
|
||||
_last_update = 0.0f;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////
|
||||
@ -113,3 +114,16 @@ INLINE ClockObject *FrameRateMeter::
|
||||
get_clock_object() const {
|
||||
return _clock_object;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////
|
||||
// Function: FrameRateMeter::update
|
||||
// Access: Published
|
||||
// Description: 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.
|
||||
////////////////////////////////////////////////////////////////////
|
||||
INLINE void FrameRateMeter::
|
||||
update() {
|
||||
do_update();
|
||||
}
|
||||
|
@ -39,6 +39,7 @@ TypeHandle FrameRateMeter::_type_handle;
|
||||
FrameRateMeter::
|
||||
FrameRateMeter(const string &name) : TextNode(name) {
|
||||
_update_interval = frame_rate_meter_update_interval;
|
||||
_last_update = 0.0f;
|
||||
_text_pattern = frame_rate_meter_text_pattern;
|
||||
_clock_object = ClockObject::get_global_clock();
|
||||
|
||||
|
@ -62,6 +62,8 @@ PUBLISHED:
|
||||
INLINE void set_clock_object(ClockObject *clock_object);
|
||||
INLINE ClockObject *get_clock_object() const;
|
||||
|
||||
INLINE void update();
|
||||
|
||||
protected:
|
||||
virtual bool cull_callback(CullTraverser *trav, CullTraverserData &data);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user