Update_Display_Timed

Functions

HC_BOOLEAN Update_Display_Timed (double time)
 Executes Update_Display and returns true if completed within a given interval. More...
 

Detailed Description

Function Documentation

◆ Update_Display_Timed()

HC_BOOLEAN Update_Display_Timed ( double  time)

Executes Update_Display and returns true if completed within a given interval.

Parameters
time- Interval (in seconds) over which the Update should happen
Returns
status - Flag indicating whether or not HOOPS completed drawing the scene in the last update. A (1) indicates it did draw the complete scene, while a (0) indicates that the previous update was aborted before completion.

DETAILS

Update_Display_Timed instructs HOOPS to perform a 'time-bounded' update, in which HOOPS/3dGS will redraw as much of the scene possible within the specified amount of time. For example, if we wanted to have logic that maintained a constant frame rate, we could call HC_Update_Display_By_Time(0.1). If HOOPS/3dGS could not finish drawing the scene (indicated by a return value of 0) then we could reduce the amount of data to draw in the next update by falling back to a lower Level of Detail, wireframe, bounding box, etc.

NOTES

If (0) is returned, users can call the "event interrupted" query on Show_Device_Info() to find out whether a timed update was aborted due to time, or due to another interrupt method (a HOOPS event from the driver, a user-queued special event, or a call to HIC_Abort_Update() from a driver's "exit update" callback).

There are cases where the time allotted could possibly be exceeded. For example, all segments with the quick moves Heuristic attribute will always be visited and their quick moves geometry drawn, so if there are a large number of quick moves segments, the allotted time for the Update could be exceeded.

If shadow maps are enabled, they are only generated once when a new light is introduced to the scene. Even if you have camera relative lights and/or have enabled the 'view dependent' suboption for shadow maps, no new shadow maps will be regenerated in subsequent calls. If you want to force shadow map regeneration, you must call Update_Display().

RESTRICTIONS

See also
Update_Display, Reset_System, Set_Driver_Options, Set_Heuristics, Await_Event, Check_For_Events, Get_Selection, Get_Wakeup