Wiki Page Content

SDL_VulkanGetDrawableSize

Use this function to get the size of the window's underlying drawable dimensions in pixels. This is used for setting viewport sizes, scissor rectangles, and other places where the a VkExtent might show up in relation to the window.

Syntax

void SDL_Vulkan_GetDrawableSize(SDL_Window* window,
                                int* w,
                                int* h);

Function Parameters

window

SDL_Window for which the size is to be queried

w

Pointer to the variable to write the width to or NULL

h

Pointer to the variable to write the height to or NULL

Code Examples

int width;
int height;
SDL_Vulkan_GetDrawableSize(window, &width, &height);

Remarks

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.

Version

This function is available in SDL 2.0.8


CategoryAPI, CategoryVulkan


CategoryVulkan

None: SDL_Vulkan_GetDrawableSize (last edited 2018-08-31 05:48:37 by ninepoints)

Feedback
Please include your contact information if you'd like to receive a reply.
Submit