# SDL_GetRendererProperties Get the properties associated with a renderer. ## Header File Defined in [](https://github.com/libsdl-org/SDL/blob/main/include/SDL3/SDL_render.h) ## Syntax ```c SDL_PropertiesID SDL_GetRendererProperties(SDL_Renderer *renderer); ``` ## Function Parameters | | | | | ------------------------------ | ------------ | ---------------------- | | [SDL_Renderer](SDL_Renderer) * | **renderer** | the rendering context. | ## Return Value ([SDL_PropertiesID](SDL_PropertiesID)) Returns a valid property ID on success or 0 on failure; call [SDL_GetError](SDL_GetError)() for more information. ## Remarks The following read-only properties are provided by SDL: - [`SDL_PROP_RENDERER_NAME_STRING`](SDL_PROP_RENDERER_NAME_STRING): the name of the rendering driver - [`SDL_PROP_RENDERER_WINDOW_POINTER`](SDL_PROP_RENDERER_WINDOW_POINTER): the window where rendering is displayed, if any - [`SDL_PROP_RENDERER_SURFACE_POINTER`](SDL_PROP_RENDERER_SURFACE_POINTER): the surface where rendering is displayed, if this is a software renderer without a window - [`SDL_PROP_RENDERER_VSYNC_NUMBER`](SDL_PROP_RENDERER_VSYNC_NUMBER): the current vsync setting - [`SDL_PROP_RENDERER_MAX_TEXTURE_SIZE_NUMBER`](SDL_PROP_RENDERER_MAX_TEXTURE_SIZE_NUMBER): the maximum texture width and height - [`SDL_PROP_RENDERER_TEXTURE_FORMATS_POINTER`](SDL_PROP_RENDERER_TEXTURE_FORMATS_POINTER): a (const [SDL_PixelFormat](SDL_PixelFormat) *) array of pixel formats, terminated with [SDL_PIXELFORMAT_UNKNOWN](SDL_PIXELFORMAT_UNKNOWN), representing the available texture formats for this renderer. - [`SDL_PROP_RENDERER_TEXTURE_WRAPPING_BOOLEAN`](SDL_PROP_RENDERER_TEXTURE_WRAPPING_BOOLEAN): true if the renderer supports [SDL_TEXTURE_ADDRESS_WRAP](SDL_TEXTURE_ADDRESS_WRAP) on non-power-of-two textures. - [`SDL_PROP_RENDERER_OUTPUT_COLORSPACE_NUMBER`](SDL_PROP_RENDERER_OUTPUT_COLORSPACE_NUMBER): an [SDL_Colorspace](SDL_Colorspace) value describing the colorspace for output to the display, defaults to [SDL_COLORSPACE_SRGB](SDL_COLORSPACE_SRGB). - [`SDL_PROP_RENDERER_HDR_ENABLED_BOOLEAN`](SDL_PROP_RENDERER_HDR_ENABLED_BOOLEAN): true if the output colorspace is [SDL_COLORSPACE_SRGB_LINEAR](SDL_COLORSPACE_SRGB_LINEAR) or [SDL_COLORSPACE_HDR10](SDL_COLORSPACE_HDR10) and the renderer has HDR headroom. This property can change dynamically when [SDL_EVENT_WINDOW_HDR_STATE_CHANGED](SDL_EVENT_WINDOW_HDR_STATE_CHANGED) is sent or the HDR headroom is adjusted with [SDL_SetRenderHDRHeadroom](SDL_SetRenderHDRHeadroom)(). - [`SDL_PROP_RENDERER_SDR_WHITE_POINT_FLOAT`](SDL_PROP_RENDERER_SDR_WHITE_POINT_FLOAT): the scale factor being applied to color values so that 1.0 is displayed as SDR white. This property can change dynamically when [SDL_EVENT_WINDOW_HDR_STATE_CHANGED](SDL_EVENT_WINDOW_HDR_STATE_CHANGED) is sent. - [`SDL_PROP_RENDERER_HDR_HEADROOM_FLOAT`](SDL_PROP_RENDERER_HDR_HEADROOM_FLOAT): the maximum brightness that can be displayed, as a multiple of SDR white. When HDR is not enabled or there is no additional headroom, this will be 1.0. This property can change dynamically when [SDL_EVENT_WINDOW_HDR_STATE_CHANGED](SDL_EVENT_WINDOW_HDR_STATE_CHANGED) is sent or the value is set with [SDL_SetRenderHDRHeadroom](SDL_SetRenderHDRHeadroom)(). With the direct3d renderer: - [`SDL_PROP_RENDERER_D3D9_DEVICE_POINTER`](SDL_PROP_RENDERER_D3D9_DEVICE_POINTER): the IDirect3DDevice9 associated with the renderer With the direct3d11 renderer: - [`SDL_PROP_RENDERER_D3D11_DEVICE_POINTER`](SDL_PROP_RENDERER_D3D11_DEVICE_POINTER): the ID3D11Device associated with the renderer - [`SDL_PROP_RENDERER_D3D11_SWAPCHAIN_POINTER`](SDL_PROP_RENDERER_D3D11_SWAPCHAIN_POINTER): the IDXGISwapChain1 associated with the renderer. This may change when the window is resized. With the direct3d12 renderer: - [`SDL_PROP_RENDERER_D3D12_DEVICE_POINTER`](SDL_PROP_RENDERER_D3D12_DEVICE_POINTER): the ID3D12Device associated with the renderer - [`SDL_PROP_RENDERER_D3D12_SWAPCHAIN_POINTER`](SDL_PROP_RENDERER_D3D12_SWAPCHAIN_POINTER): the IDXGISwapChain4 associated with the renderer. - [`SDL_PROP_RENDERER_D3D12_COMMAND_QUEUE_POINTER`](SDL_PROP_RENDERER_D3D12_COMMAND_QUEUE_POINTER): the ID3D12CommandQueue associated with the renderer With the metal renderer: - [`SDL_PROP_RENDERER_METAL_DEVICE_POINTER`](SDL_PROP_RENDERER_METAL_DEVICE_POINTER): the MTLDevice associated with the renderer - [`SDL_PROP_RENDERER_METAL_COMMAND_QUEUE_POINTER`](SDL_PROP_RENDERER_METAL_COMMAND_QUEUE_POINTER): the MTLCommandQueue associated with the renderer. Work submitted on this queue will be ordered relative to other rendering. [SDL_FlushRenderer](SDL_FlushRenderer)() can be used to guarantee the current rendering has been submitted. With the vulkan renderer: - [`SDL_PROP_RENDERER_VULKAN_INSTANCE_POINTER`](SDL_PROP_RENDERER_VULKAN_INSTANCE_POINTER): the VkInstance associated with the renderer - [`SDL_PROP_RENDERER_VULKAN_SURFACE_NUMBER`](SDL_PROP_RENDERER_VULKAN_SURFACE_NUMBER): the VkSurfaceKHR associated with the renderer - [`SDL_PROP_RENDERER_VULKAN_PHYSICAL_DEVICE_POINTER`](SDL_PROP_RENDERER_VULKAN_PHYSICAL_DEVICE_POINTER): the VkPhysicalDevice associated with the renderer - [`SDL_PROP_RENDERER_VULKAN_DEVICE_POINTER`](SDL_PROP_RENDERER_VULKAN_DEVICE_POINTER): the VkDevice associated with the renderer - [`SDL_PROP_RENDERER_VULKAN_GRAPHICS_QUEUE_FAMILY_INDEX_NUMBER`](SDL_PROP_RENDERER_VULKAN_GRAPHICS_QUEUE_FAMILY_INDEX_NUMBER): the queue family index used for rendering - [`SDL_PROP_RENDERER_VULKAN_PRESENT_QUEUE_FAMILY_INDEX_NUMBER`](SDL_PROP_RENDERER_VULKAN_PRESENT_QUEUE_FAMILY_INDEX_NUMBER): the queue family index used for presentation - [`SDL_PROP_RENDERER_VULKAN_SWAPCHAIN_IMAGE_COUNT_NUMBER`](SDL_PROP_RENDERER_VULKAN_SWAPCHAIN_IMAGE_COUNT_NUMBER): the number of swapchain images, or potential frames in flight, used by the Vulkan renderer With the gpu renderer: - [`SDL_PROP_RENDERER_GPU_DEVICE_POINTER`](SDL_PROP_RENDERER_GPU_DEVICE_POINTER): the [SDL_GPUDevice](SDL_GPUDevice) associated with the renderer ## Thread Safety It is safe to call this function from any thread. ## Version This function is available since SDL 3.2.0. ## Code Examples ```c SDL_Renderer *renderer; SDL_PropertiesID props = SDL_GetRendererProperties(renderer); int max_texture_size = (int)SDL_GetNumberProperty(props, SDL_PROP_RENDERER_MAX_TEXTURE_SIZE_NUMBER, 0); ``` ---- [CategoryAPI](CategoryAPI), [CategoryAPIFunction](CategoryAPIFunction), [CategoryRender](CategoryRender)