#include <gauge3d/scheduler.h>
Inherits GAUGE3D::GObject.
Public Methods | |
GScheduler () | |
Constructor. | |
~GScheduler () | |
Destructor. | |
void | CallEveryFrame (GObject *object,int priority=0) |
Tell the scheduler to call object->DoFrame() every frame. More... | |
void | StopCallingEveryFrame (GObject *object) |
Remove the object from the list of objects to call every frame. | |
int | GetObjectPriority (GObject *object) |
Get the priority of an object on the call every frame list. | |
void | SetObjectPriority (GObject *object,int priority) |
Change the priority of an object on the call every frame list. | |
virtual void | DoFrame (tTime time,tTime frametime) |
Call the DoFrame() functions for all objects which requested it. More... | |
tTime | Time () |
Get the current time. | |
tTime | FrameTime () |
Get the amount of time spent processing the previous frame. |
GScheduler is used to synchronize events throughout the engine. Each subsystem has a scheduler for events which relate to that subsystem. Many classes which are part of that subsystem will register themselves with the scheduler. Then, the scheduler will call those objects' DoFrame() functions every frame.
For example, when you create a GDisplay and give it a GCamera to render from, you do not have to tell it when to render each frame. This is because the GDisplay asks gVideoScheduler to call it every frame. When it gets called back by gVideoScheduler, the GDisplay renders the scene.
|
Tell the scheduler to call object->DoFrame() every frame.
|
|
Call the DoFrame() functions for all objects which requested it.
Reimplemented from GAUGE3D::GObject. |