class
HeadlessRenderWindow
A headless render window that doesn't create an OS window.
Used for headless rendering in automated testing or offscreen rendering scenarios. All window-handle-dependent operations become no-ops.
Public
Constructors
HeadlessRenderWindow
Methods
Initialize
Initializes all the internal data of this object.
Must be called right after construction for new objects, or after deserialization for deserialized objects. If requested, render proxy is created and queued for initialization on the render thread.
Destroy
Closes and destroys the window.
ScreenToWindowPosition
Converts screen position into window local position.
WindowToScreenPosition
Converts window local position to screen position.
Resize
Resize the window to specified width and height in pixels.
- width
- Width of the window in pixels.
- height
- Height of the window in pixels.
Move
Move the window to specified screen coordinates.
- left
- Position of the left border of the window on the screen.
- top
- Position of the top border of the window on the screen.
Hide
Hides the window.
Show
Shows a previously hidden window.
Minimize
Minimizes the window to the taskbar.
Maximize
Maximizes the window over the entire current screen.
Restore
Restores the window to original position and size if it is minimized or maximized.
SetFullscreen
Switches the window to fullscreen mode.
Child windows cannot go into fullscreen mode.
- width
- Width of the window frame buffer in pixels.
- height
- Height of the window frame buffer in pixels.
- refreshRate
- Refresh rate of the window in Hertz.
- monitorIndex
- Index of the monitor to go fullscreen on.
SetWindowed
Switches the window to windowed mode.
- width
- Window width in pixels.
- height
- Window height in pixels.
SetVSync
Enables or disables vertical synchronization.
When enabled the system will wait for monitor refresh before presenting the back buffer. This eliminates tearing but can result in increased input lag.
- enabled
- True to enable vsync, false to disable.
- interval
- Interval at which to perform the sync. Value of one means the sync will be performed for each monitor refresh, value of two means it will be performs for every second (half the rate), and so on.
GetPlatformWindowHandle
Returns 0 since there is no platform window.
Protected
Methods
CreateRenderProxy
Creates an object that contains render thread specific data and methods for this object.
Can be null if such object is not required.