mirror of
https://gitlab.freedesktop.org/cairo/cairo.git
synced 2026-06-08 09:18:19 +02:00
gl: Fail if GL implementation doesn't support shaders
The non-shaders implementation was never tuned for fixed-function GL implementation, the maintainers are not interested in supporting it, and the hardware is rather rare at this point. This lets us focus on the implementation for modern hardware, which needs plenty of work still. Reviewed-by: Eric Anholt <eric@anholt.net>
This commit is contained in:
parent
0e08e7adfc
commit
037c9ba7e2
1 changed files with 6 additions and 0 deletions
|
|
@ -359,9 +359,15 @@ _cairo_gl_context_init_shaders (cairo_gl_context_t *ctx)
|
|||
(_cairo_gl_has_extension ("GL_ARB_shader_objects") &&
|
||||
_cairo_gl_has_extension ("GL_ARB_fragment_shader") &&
|
||||
_cairo_gl_has_extension ("GL_ARB_vertex_shader")))
|
||||
{
|
||||
ctx->shader_impl = &shader_impl_core_2_0;
|
||||
}
|
||||
else
|
||||
{
|
||||
ctx->shader_impl = NULL;
|
||||
fprintf (stderr, "Error: The cairo gl backend requires shader support!\n");
|
||||
return CAIRO_STATUS_DEVICE_ERROR;
|
||||
}
|
||||
|
||||
memset (ctx->vertex_shaders, 0, sizeof (ctx->vertex_shaders));
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue