vkf_viewer_create Interface

interface


Called by

interface~~vkf_viewer_create~~CalledByGraph interface~vkf_viewer_create vkf_viewer_create proc~open WindowProxy%open proc~open->interface~vkf_viewer_create

public function vkf_viewer_create(width, height, title, title_len, native_window, pixel_ratio, vsync) bind(C, name="vkf_viewer_create")

Arguments

Type IntentOptional 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 title

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

Return Value type(c_ptr)

Description

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).