pub unsafe extern "C" fn SDL_Vulkan_GetDrawableSize(
    window: *mut SDL_Window,
    w: *mut c_int,
    h: *mut c_int
)
Expand description

Get the size of a window’s underlying drawable in pixels (for use with setting viewport, scissor & etc).

  • window The SDL_Window from which the drawable size should be queried.
  • w Pointer to variable for storing the width in pixels, may be NULL.
  • h Pointer to variable for storing the height in pixels, may be NULL.

This may differ from SDL_GetWindowSize if we’re rendering to a high-DPI drawable, i.e. the window was created with SDL_WINDOW_ALLOW_HIGHDPI on a platform with high-DPI support (Apple calls this “Retina”), and not disabled by the SDL_HINT_VIDEO_HIGHDPI_DISABLED hint.

On macOS high-DPI support must be enabled for an application by setting NSHighResolutionCapable to true in its Info.plist.

See Also: SDL_GetWindowSize and SDL_CreateWindow