---
name: "SDL_EGL_GetWindowSurface"
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_EGL_GetWindowSurface"
---

# SDL\_EGL\_GetWindowSurface(3)

Get the EGL surface associated with the window.

## NAME

SDL\_EGL\_GetWindowSurface - Get the EGL surface associated with the window.

## HEADER FILE

Defined in SDL3/SDL\_video.h

## SYNOPSIS

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

**SDL\_EGLSurface SDL\_EGL\_GetWindowSurface(SDL\_Window \*window);**

## FUNCTION PARAMETERS

- *window*

  the window to query.

## RETURN VALUE

( **SDL\_EGLSurface** ) Returns the EGLSurface pointer associated with the window, or NULL on failure.

## THREAD SAFETY

This function should only be called on the main thread.

## AVAILABILITY

This function is available since SDL 3.2.0.
