class
RenderWindow
Operating system window with a specific position, size and style.
Each window serves as a surface that can be rendered into by RenderAPI operations.
Public
Methods
~RenderWindow
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.
SetFullscreen
Switches the window to fullscreen mode.
Child windows cannot go into fullscreen mode.
- videoMode
- Mode retrieved from VideoModeInfo in GpuDevice.
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 a platform-specific window handle. (e.g.
HWND on Windows)
GetRenderWindowProperties
Returns properties that describe the render window.
Destroy
Closes and destroys the window.
staticCreate
Creates a new render window using the specified options.
Optionally makes the created window a child of another window.
staticGetRttiStatic
Fields
OnCloseRequested
Triggers when the OS requests that the window is closed (e.g. user clicks on the X button in the title bar).
Internal
Methods
NotifyWindowEvent
Notifies the window that a specific event occurred as reported by the OS event loop.
DoOnWindowMovedOrResized
Method that triggers whenever the window changes size or position.
DoOnDPIScaleChanged
Method that triggers whenever the DPI scale changes.
Protected
Constructors
RenderWindow
Methods
CreateRenderProxySyncPacket
Creates a data packet that will be used for syncing the core object with it's render proxy.
Caller must free the retrieved packet using the provided allocator when done using it.