---
name: "SDL_GetRenderer"
section: "3"
platform: "linux"
package: "libsdl3-doc"
version: "3.2.10+ds-1"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/SDL_GetRenderer"
---

# SDL\_GetRenderer(3)

Get the renderer associated with a window.

## NAME

SDL\_GetRenderer - Get the renderer associated with a window.

## HEADER FILE

Defined in SDL3/SDL\_render.h

## SYNOPSIS

```
#include "SDL3/SDL.h"
```

**SDL\_Renderer \* SDL\_GetRenderer(SDL\_Window \*window);**

## FUNCTION PARAMETERS

- *window*

  the window to query.

## RETURN VALUE

( **SDL\_Renderer**\
  \*) Returns the rendering context on success or NULL on failure; call  **SDL\_GetError** () for more information.

## THREAD SAFETY

It is safe to call this function from any thread.

## AVAILABILITY

This function is available since SDL 3.2.0.
