GREM 3.12.0
Game/Rendering Engine Modules for C++
Loading...
Searching...
No Matches
grem::graphics::WindowOptions Struct Reference

Configuration options for a Window. More...

#include <GREM/graphics/Window.hpp>

Public Attributes

String title = "Application"
 Null-terminated UTF-8 string of the displayed title of the window.
Optional< int32_t > positionX {}
 The desired horizontal position of the window, in screen coordinates (typically pixels), or an empty optional to choose a position automatically.
Optional< int32_t > positionY {}
 The desired vertical position of the window, in screen coordinates (typically pixels), or an empty optional to choose a position automatically.
Extent2D size {.width = 800, .height = 600}
 The desired size of the window, in screen coordinates (typically pixels).
uint32_t multisampleCount = 1
 Number of samples used for multisample anti-aliasing (MSAA) when rendering directly to the window.
float opacity = 1.0f
 Opacity of the window, from 0 (transparent) to 1 (opaque).
bool highPixelDensity = false
 Whether the window's backbuffer should have high pixel density (if possible) or not.
bool hidden = false
 Whether the window should start hidden or not.
bool focus = true
 Whether the window should start with input focus or not.
bool minimized = false
 Whether the window should start minimized or not.
bool resizable = true
 Whether the user should be allowed to resize the window or not.
bool fullscreen = false
 Whether the window should start in fullscreen mode or not.
bool borderless = false
 Whether the window should be borderless or not.
bool hideFromTaskbar = false
 Whether the window should be hidden from the taskbar and window list and be treated as a utility window or not.
bool alwaysOnTop = false
 Whether the window should always be on top of other windows or not.
bool relativeMouseMode = false
 Whether the window should start with relative mouse mode enabled or not.

Detailed Description

Configuration options for a Window.

Member Data Documentation

◆ title

String grem::graphics::WindowOptions::title = "Application"

Null-terminated UTF-8 string of the displayed title of the window.

◆ positionX

Optional<int32_t> grem::graphics::WindowOptions::positionX {}

The desired horizontal position of the window, in screen coordinates (typically pixels), or an empty optional to choose a position automatically.

◆ positionY

Optional<int32_t> grem::graphics::WindowOptions::positionY {}

The desired vertical position of the window, in screen coordinates (typically pixels), or an empty optional to choose a position automatically.

◆ size

Extent2D grem::graphics::WindowOptions::size {.width = 800, .height = 600}

The desired size of the window, in screen coordinates (typically pixels).

Warning
Both the width and height must be positive.

◆ multisampleCount

uint32_t grem::graphics::WindowOptions::multisampleCount = 1

Number of samples used for multisample anti-aliasing (MSAA) when rendering directly to the window.

This can be used to mitigate aliasing artifacts on the edges of 3D objects, at the cost of some performance.

If set to 1 or lower, MSAA will not be used.

Remarks
Typical values are 1, 2 and 4.
Note
Current GPUs (as of 2026) rarely support values greater than 8.

◆ opacity

float grem::graphics::WindowOptions::opacity = 1.0f

Opacity of the window, from 0 (transparent) to 1 (opaque).

◆ highPixelDensity

bool grem::graphics::WindowOptions::highPixelDensity = false

Whether the window's backbuffer should have high pixel density (if possible) or not.

◆ hidden

bool grem::graphics::WindowOptions::hidden = false

Whether the window should start hidden or not.

◆ focus

bool grem::graphics::WindowOptions::focus = true

Whether the window should start with input focus or not.

◆ minimized

bool grem::graphics::WindowOptions::minimized = false

Whether the window should start minimized or not.

◆ resizable

bool grem::graphics::WindowOptions::resizable = true

Whether the user should be allowed to resize the window or not.

◆ fullscreen

bool grem::graphics::WindowOptions::fullscreen = false

Whether the window should start in fullscreen mode or not.

◆ borderless

bool grem::graphics::WindowOptions::borderless = false

Whether the window should be borderless or not.

◆ hideFromTaskbar

bool grem::graphics::WindowOptions::hideFromTaskbar = false

Whether the window should be hidden from the taskbar and window list and be treated as a utility window or not.

◆ alwaysOnTop

bool grem::graphics::WindowOptions::alwaysOnTop = false

Whether the window should always be on top of other windows or not.

◆ relativeMouseMode

bool grem::graphics::WindowOptions::relativeMouseMode = false

Whether the window should start with relative mouse mode enabled or not.

When relative mouse mode is enabled, it hides the mouse cursor, locks it to the window and causes all further mouse motion to be provided as relative motion events until it is disabled again.


The documentation for this struct was generated from the following file: