| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| integer(kind=c_int), | value | :: | width |
window size (window units: logical pixels) |
||
| integer(kind=c_int), | value | :: | height |
window size (window units: logical pixels) |
||
| character(kind=c_char, len=1), | intent(in), | dimension(*) | :: | title |
window title |
|
| integer(kind=c_int), | value | :: | title_len |
the length of |
||
| integer(kind=c_long_long), | value | :: | native_window |
0 for a window of its own, or the native handle of an existing window to render into (e.g. a Qt QWindow's winId(): an NSView* on macOS, an HWND on Windows, an xcb window on Linux) |
||
| real(kind=c_double), | value | :: | pixel_ratio |
framebuffer pixels per window unit of an existing window (Qt's devicePixelRatio); ignored for a window of its own |
||
| integer(kind=c_int), | value | :: | vsync |
1 to present at the display's refresh (FIFO), 0 as soon as a frame is ready (IMMEDIATE where the driver has it, else FIFO), e.g. for benchmarks |
A viewer with one window, an empty scene and a trackball camera; null on failure.
With an existing window (native_window not 0) the host owns that window's events and
forwards them (vkf_viewer_mouse, ..., vkf_viewer_resize).