Scroll to navigation

SDL_GL_ExtensionSupported(3) SDL3 FUNCTIONS SDL_GL_ExtensionSupported(3)

NAME

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

SYNOPSIS

#include "SDL3/SDL.h"
SDL_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

the name of the extension to check

RETURN VALUE

Returns SDL_TRUE
if the extension is supported,

SDL_FALSE
otherwise.

AVAILABILITY

This function is available since SDL 3.0.0.

SDL 3.1.0 SDL