[cairo] [PATCH] gl: Remove the shader language version abstraction

Behdad Esfahbod behdad at behdad.org
Fri Aug 17 13:33:26 PDT 2012


On 08/17/2012 03:44 PM, Martin Robinson wrote:
>  void
>  _cairo_gl_shader_bind_matrix (cairo_gl_context_t *ctx,
>  			      const char *name, cairo_matrix_t* m)
>  {
> -    ctx->shader_impl->bind_matrix (ctx, ctx->current_shader, name, m);
> +    cairo_gl_dispatch_t *dispatch = &ctx->dispatch;
> +    GLint location = dispatch->GetUniformLocation (ctx->current_shader->program,
> +						   name);
> +    float gl_m[16] = {

s/16/9/
?

> +	m->xx, m->xy, m->x0,
> +	m->yx, m->yy, m->y0,
> +	0,     0,     1
> +    };
> +    assert (location != -1);
> +    dispatch->UniformMatrix3fv (location, 1, GL_TRUE, gl_m);
>  }


More information about the cairo mailing list