Package: gdk

Function gdk:gl-context-is-legacy

Lambda List

gdk:gl-context-is-legacy (context)

Arguments

context -- a gdk:gl-context object

Return Value

True if the GL context is in legacy mode.

Details

Whether the GL context is in legacy mode or not. The gdk:gl-context object must be realized before calling this function.

When realizing a GL context, GDK will try to use the OpenGL 3.2 core profile. This profile removes all the OpenGL API that was deprecated prior to the 3.2 version of the specification. If the realization is successful, this function will return false.

If the underlying OpenGL implementation does not support core profiles, GDK will fall back to a pre-3.2 compatibility profile, and this function will return true.

You can use the value returned by this function to decide which kind of OpenGL API to use, or whether to do extension discovery, or what kind of shader programs to load.
 

See also

#2023-8-3