## GstGLShader

GstGLShader

## Synopsis

    #define             GST_GL_SHADER_ERROR
    enum                GstGLShaderError;
    enum                GstGLShaderSourceType;
                        GstGLShaderPrivate;
    struct              GstGLShader;
    GQuark              gst_gl_shader_error_quark           (void);
    GstGLShader *       gst_gl_shader_new                   (void);
    void                gst_gl_shader_set_vertex_source     (GstGLShader *shader,
                                                             const gchar *src);
    void                gst_gl_shader_set_fragment_source   (GstGLShader *shader,
                                                             const gchar *src);
    const gchar *       gst_gl_shader_get_vertex_source     (GstGLShader *shader);
    const gchar *       gst_gl_shader_get_fragment_source   (GstGLShader *shader);
    void                gst_gl_shader_set_active            (GstGLShader *shader,
                                                             gboolean active);
    gboolean            gst_gl_shader_is_compiled           (GstGLShader *shader);
    gboolean            gst_gl_shader_compile               (GstGLShader *shader,
                                                             GError **error);
    gboolean            gst_gl_shader_compile_and_check     (GstGLShader *shader,
                                                             const gchar *source,
                                                             GstGLShaderSourceType type);
    void                gst_gl_shader_release               (GstGLShader *shader);
    void                gst_gl_shader_use                   (GstGLShader *shader);
    void                gst_gl_shader_set_uniform_1i        (GstGLShader *shader,
                                                             const gchar *name,
                                                             gint value);
    void                gst_gl_shader_set_uniform_1f        (GstGLShader *shader,
                                                             const gchar *name,
                                                             gfloat value);
    void                gst_gl_shader_set_uniform_1fv       (GstGLShader *shader,
                                                             const gchar *name,
                                                             guint count,
                                                             gfloat *value);
    GLint               gst_gl_shader_get_attribute_location
                                                            (GstGLShader *shader,
                                                             const gchar *name);

## Object Hierarchy

      GObject
       +----GstGLShader

## Properties

      "active"                   gchar*                : Read / Write
      "compiled"                 gboolean              : Read
      "fragment-src"             gchar*                : Read / Write
      "vertex-src"               gchar*                : Read / Write

## Description

## Details

### GST_GL_SHADER_ERROR

    #define GST_GL_SHADER_ERROR (gst_gl_shader_error_quark ())

### enum GstGLShaderError

    typedef enum {
      GST_GL_SHADER_ERROR_COMPILE,
      GST_GL_SHADER_ERROR_LINK,
      GST_GL_SHADER_ERROR_PROGRAM
    } GstGLShaderError;

### enum GstGLShaderSourceType

    typedef enum {
      GST_GL_SHADER_FRAGMENT_SOURCE,
      GST_GL_SHADER_VERTEX_SOURCE
    } GstGLShaderSourceType;

### GstGLShaderPrivate

    typedef struct _GstGLShaderPrivate GstGLShaderPrivate;

### struct GstGLShader

    struct GstGLShader;

### gst_gl_shader_error_quark ()

    GQuark              gst_gl_shader_error_quark           (void);

### gst_gl_shader_new ()

    GstGLShader *       gst_gl_shader_new                   (void);

### gst_gl_shader_set_vertex_source ()

    void                gst_gl_shader_set_vertex_source     (GstGLShader *shader,
                                                             const gchar *src);

### gst_gl_shader_set_fragment_source ()

    void                gst_gl_shader_set_fragment_source   (GstGLShader *shader,
                                                             const gchar *src);

### gst_gl_shader_get_vertex_source ()

    const gchar *       gst_gl_shader_get_vertex_source     (GstGLShader *shader);

### gst_gl_shader_get_fragment_source ()

    const gchar *       gst_gl_shader_get_fragment_source   (GstGLShader *shader);

### gst_gl_shader_set_active ()

    void                gst_gl_shader_set_active            (GstGLShader *shader,
                                                             gboolean active);

### gst_gl_shader_is_compiled ()

    gboolean            gst_gl_shader_is_compiled           (GstGLShader *shader);

### gst_gl_shader_compile ()

    gboolean            gst_gl_shader_compile               (GstGLShader *shader,
                                                             GError **error);

### gst_gl_shader_compile_and_check ()

    gboolean            gst_gl_shader_compile_and_check     (GstGLShader *shader,
                                                             const gchar *source,
                                                             GstGLShaderSourceType type);

### gst_gl_shader_release ()

    void                gst_gl_shader_release               (GstGLShader *shader);

### gst_gl_shader_use ()

    void                gst_gl_shader_use                   (GstGLShader *shader);

### gst_gl_shader_set_uniform_1i ()

    void                gst_gl_shader_set_uniform_1i        (GstGLShader *shader,
                                                             const gchar *name,
                                                             gint value);

### gst_gl_shader_set_uniform_1f ()

    void                gst_gl_shader_set_uniform_1f        (GstGLShader *shader,
                                                             const gchar *name,
                                                             gfloat value);

### gst_gl_shader_set_uniform_1fv ()

    void                gst_gl_shader_set_uniform_1fv       (GstGLShader *shader,
                                                             const gchar *name,
                                                             guint count,
                                                             gfloat *value);

### gst_gl_shader_get_attribute_location ()

    GLint               gst_gl_shader_get_attribute_location
                                                            (GstGLShader *shader,
                                                             const gchar *name);

## Property Details

### The `"active"` property

      "active"                   gchar*                : Read / Write

Enable/Disable the shader.

Default value: NULL

### The `"compiled"` property

      "compiled"                 gboolean              : Read

Shader compile and link status.

Default value: FALSE

### The `"fragment-src"` property

      "fragment-src"             gchar*                : Read / Write

GLSL Fragment Shader source code.

Default value: NULL

### The `"vertex-src"` property

      "vertex-src"               gchar*                : Read / Write

GLSL Vertex Shader source code.

Default value: NULL