---
name: "SDL_GL_ExtensionSupported"
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_GL_ExtensionSupported"
---

# SDL\_GL\_ExtensionSupported(3)

Check if an OpenGL extension is supported for the current context.

## NAME

SDL\_GL\_ExtensionSupported - Check if an OpenGL extension is supported for the current context.

## HEADER FILE

Defined in SDL3/SDL\_video.h

## SYNOPSIS

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

**bool SDL\_GL\_ExtensionSupported(const char \*extension);**

## DESCRIPTION

This function operates on the current GL context; you must have created a context and it must be current before calling this function. Do not assume that all contexts you create will have the same set of extensions available, or that recreating an existing context will offer the same extensions again.

While it's probably not a massive overhead, this function is not an O(1) operation. Check the extensions you care about after creating the GL context and save that information somewhere instead of calling the function every time you need to know.

## FUNCTION PARAMETERS

- *extension*

  the name of the extension to check.

## RETURN VALUE

Returns true if the extension is supported, false otherwise.

## THREAD SAFETY

This function should only be called on the main thread.

## AVAILABILITY

This function is available since SDL 3.2.0.
