logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

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

Availability

       This function is available since SDL 3.2.0.

Simple Directmedia Layer                           SDL 3.2.20                       SDL_GL_ExtensionSupported(3)

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.

Name

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

Return Value

       Returns true if the extension is supported, false otherwise.

Synopsis

#include<SDL3/SDL_video.h>boolSDL_GL_ExtensionSupported(constchar*extension);

Thread Safety

       This function should only be called on the main thread.

See Also