Class: render_device
Current render device state.
Source
C++ class render_device
Custom Constructor
render_device
Remarks
Values are snapshots of the global engine Device for the current frame.
Methods
is_paused()
is_paused(): boolean;Check whether the render device is paused.
Returns
boolean
Whether game rendering is paused.
pause()
pause(paused: boolean): void;Change game pause state.
Parameters
| Parameter | Type | Description |
|---|---|---|
paused | boolean | Whether the game should be paused. |
Returns
void
Remarks
Pauses the game timer but not sound emitters. Dedicated servers and benchmark mode ignore pause requests.
time_global()
time_global(): number;Get current game timestamp.
Returns
number
Milliseconds from game start.
Remarks
Reads the frame-updated Device.dwTimeGlobal value.
Example
`29319`, `46297`Properties
aspect_ratio
readonly aspect_ratio: number;Current viewport aspect ratio.
cam_dir
readonly cam_dir: vector;Camera forward direction.
cam_pos
readonly cam_pos: vector;Camera world position.
cam_right
readonly cam_right: vector;Camera right direction.
cam_top
readonly cam_top: vector;Camera up direction.
f_time_delta
readonly f_time_delta: number;Last frame time delta in seconds.
Remarks
This value is 0 while the game timer is paused.
fov
readonly fov: number;Current field of view.
frame
readonly frame: number;Current render frame number.
height
readonly height: number;Backbuffer height in pixels.
precache_frame
readonly precache_frame: number;Remaining precache frame count.
time_delta
readonly time_delta: number;Last frame time delta in milliseconds.
Remarks
This value is 0 while the game timer is paused.
width
readonly width: number;Backbuffer width in pixels.