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

Behdad Esfahbod <[email protected]>
Newsgroups gmane.comp.lib.cairo
Message-ID <[email protected]>
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);
>  }
-- 
cairo mailing list
[email protected]
http://lists.cairographics.org/mailman/listinfo/cairo
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.