Tao.FreeGlut SDK Documentation

Glut.glutExtensionSupported Method 

Helps to easily determine whether a given OpenGL extension is supported.

[Visual Basic]
Public Shared Function glutExtensionSupported( _
   ByVal extension As String _
) As Integer
[C#]
public static int glutExtensionSupported(
   string extension
);

Parameters

extension
Name of OpenGL extension to query.

Return Value

Returns non-zero if the extension is supported, zero if not supported.

Remarks

glutExtensionSupported helps to easily determine whether a given OpenGL extension is supported or not. The extension parameter names the extension to query. The supported extensions can also be determined with Gl.glGetString(Gl.GL_EXTENSIONS), but glutExtensionSupported does the correct parsing of the returned string.

There must be a valid current window to call glutExtensionSupported.

glutExtensionSupported only returns information about OpenGL extensions only. This means window system dependent extensions (for example, GLX extensions) are not reported by glutExtensionSupported.

EXAMPLE

            if(!Glut.glutExtensionSupported("GL_EXT_texture")) {
            System.Console.WriteLine("Missing the texture extension!");
            System.Environment.Exit(1);
            }
            

Notice that the name argument includes both the GL prefix and the extension family prefix (EXT).

See Also

Glut Class | Tao.FreeGlut Namespace | glutGet | glGetString