## GstGLSL GstGLSL — helpers for dealing with OpenGL shaders |

## Functions

GstGLSLProfile | gst_glsl_profile_from_string ()
const gchar * | gst_glsl_profile_to_string ()
GstGLSLVersion | gst_glsl_version_from_string ()
const gchar * | gst_glsl_version_to_string ()
gboolean | gst_glsl_version_profile_from_string ()
gchar * | gst_glsl_version_profile_to_string ()
gboolean | gst_glsl_string_get_version_profile ()
gboolean | gst_gl_context_supports_glsl_profile_version ()
GstGLSLVersion | gst_gl_version_to_glsl_version ()
gboolean | gst_gl_context_supports_precision ()
gboolean | gst_gl_context_supports_precision_highp ()

## Types and Values

#define | GST_GLSL_ERROR
enum | GstGLSLError
enum | GstGLSLProfile
enum | GstGLSLVersion

## Includes

    #include <gst/gl/gl.h>

## Description

## Functions

### gst_glsl_profile_from_string ()

    GstGLSLProfile
    gst_glsl_profile_from_string (const gchar *string);

#### Parameters

string | a GLSL version string |

#### Returns

the GstGLSLProfile of `string` or `GST_GLSL_PROFILE_NONE` on error

### gst_glsl_profile_to_string ()

    const gchar *
    gst_glsl_profile_to_string (GstGLSLProfile profile);

#### Parameters

profile | a GstGLSLProfile |

#### Returns

the name for `profile` or `NULL` on error.

[nullable]

### gst_glsl_version_from_string ()

    GstGLSLVersion
    gst_glsl_version_from_string (const gchar *string);

#### Parameters

string | a GLSL version string |

#### Returns

the GstGLSLVersion of `string` or `GST_GLSL_VERSION_NONE` on error

### gst_glsl_version_to_string ()

    const gchar *
    gst_glsl_version_to_string (GstGLSLVersion version);

#### Parameters

version | a GstGLSLVersion |

#### Returns

the name of `version` or `NULL` on error.

[nullable]

### gst_glsl_version_profile_from_string ()

    gboolean
    gst_glsl_version_profile_from_string (const gchar *string,
                                          GstGLSLVersion *version_ret,
                                          GstGLSLProfile *profile_ret);

Note: this function expects either a version GLSL preprocesser directive or a valid GLSL version and/or profile.

#### Parameters

string | a valid GLSL version string |
version_ret | resulting GstGLSLVersion. | [out]
profile_ret | resulting GstGLSLVersion. | [out]

#### Returns

TRUE if a valid version string was found, FALSE otherwise

### gst_glsl_version_profile_to_string ()

    gchar *
    gst_glsl_version_profile_to_string (GstGLSLVersion version,
                                        GstGLSLProfile profile);

#### Parameters

version | a GstGLSLVersion |
profile | a GstGLSLVersion |

#### Returns

the combined GLSL version string for `version` and `profile`

### gst_glsl_string_get_version_profile ()

    gboolean
    gst_glsl_string_get_version_profile (const gchar *s,
                                         GstGLSLVersion *version,
                                         GstGLSLProfile *profile);

Note: this function first searches the first 1 kilobytes for a version preprocessor directive and then executes `gst_glsl_version_profile_from_string()`.

#### Parameters

s | string to search for a valid version string |
version | resulting GstGLSLVersion. | [out]
profile | resulting GstGLSLProfile. | [out]

#### Returns

TRUE if a valid version string was found, FALSE otherwise

### gst_gl_context_supports_glsl_profile_version ()

    gboolean
    gst_gl_context_supports_glsl_profile_version
                                   (GstGLContext *context,
                                    GstGLSLVersion version,
                                    GstGLSLProfile profile);

#### Parameters

context | a GstGLContext |
version | a GstGLSLVersion |
profile | a GstGLSLProfile |

#### Returns

Whether `context` supports the combination of `version` with `profile`

### gst_gl_version_to_glsl_version ()

    GstGLSLVersion
    gst_gl_version_to_glsl_version (GstGLAPI gl_api,
                                    gint maj,
                                    gint min);

#### Parameters

gl_api | the GstGLAPI |
maj | the major GL version |
min | the minor GL version |

#### Returns

The minimum supported GstGLSLVersion available for `gl_api` , `maj` and `min`

### gst_gl_context_supports_precision ()

    gboolean
    gst_gl_context_supports_precision (GstGLContext *context,
                                       GstGLSLVersion version,
                                       GstGLSLProfile profile);

#### Parameters

context | a GstGLContext |
version | a GstGLSLVersion |
profile | a GstGLSLProfile |

#### Returns

whether `context` supports the 'precision' specifier in GLSL shaders

Since: 1.16

### gst_gl_context_supports_precision_highp ()

    gboolean
    gst_gl_context_supports_precision_highp
                                   (GstGLContext *context,
                                    GstGLSLVersion version,
                                    GstGLSLProfile profile);

#### Parameters

context | a GstGLContext |
version | a GstGLSLVersion |
profile | a GstGLSLProfile |

#### Returns

whether `context` supports the 'precision highp' specifier in GLSL shaders

Since: 1.16

## Types and Values

### GST_GLSL_ERROR

    #define GST_GLSL_ERROR (gst_glsl_error_quark ())

Error domain for GStreamer's GLSL module. Errors in this domain will be from the GstGLSLError enumeration

### enum GstGLSLError

Compilation stage that caused an error

#### Members

GST_GLSL_ERROR_COMPILE | Compilation error occured |
GST_GLSL_ERROR_LINK | Link error occured |
GST_GLSL_ERROR_PROGRAM | General program error occured |

Since: 1.8

### enum GstGLSLProfile

GLSL profiles

#### Members

GST_GLSL_PROFILE_NONE | no profile supported/available |
GST_GLSL_PROFILE_ES | OpenGL|ES profile |
GST_GLSL_PROFILE_CORE | OpenGL core profile |
GST_GLSL_PROFILE_COMPATIBILITY | OpenGL compatibility profile |
GST_GLSL_PROFILE_ANY | any OpenGL/OpenGL|ES profile |

Since: 1.8

### enum GstGLSLVersion

GLSL version list

#### Members

GST_GLSL_VERSION_NONE | no version |
GST_GLSL_VERSION_100 | version 100 (only valid for ES) |
GST_GLSL_VERSION_110 | version 110 (only valid for compatibility desktop GL) |
GST_GLSL_VERSION_120 | version 120 (only valid for compatibility desktop GL) |
GST_GLSL_VERSION_130 | version 130 (only valid for compatibility desktop GL) |
GST_GLSL_VERSION_140 | version 140 (only valid for compatibility desktop GL) |
GST_GLSL_VERSION_150 | version 150 (valid for compatibility/core desktop GL) |
GST_GLSL_VERSION_300 | version 300 (only valid for ES) |
GST_GLSL_VERSION_310 | version 310 (only valid for ES) |
GST_GLSL_VERSION_320 | version 320 (only valid for ES) |
GST_GLSL_VERSION_330 | version 330 (valid for compatibility/core desktop GL) |
GST_GLSL_VERSION_400 | version 400 (valid for compatibility/core desktop GL) |
GST_GLSL_VERSION_410 | version 410 (valid for compatibility/core desktop GL) |
GST_GLSL_VERSION_420 | version 420 (valid for compatibility/core desktop GL) |
GST_GLSL_VERSION_430 | version 430 (valid for compatibility/core desktop GL) |
GST_GLSL_VERSION_440 | version 440 (valid for compatibility/core desktop GL) |
GST_GLSL_VERSION_450 | version 450 (valid for compatibility/core desktop GL) |

Since: 1.8

## See Also

GstGLSLStage, GstGLShader